Jump to content

Lucid

Active Members
  • Posts

    55
  • Joined

  • Last visited

Recent Profile Visitors

299 profile views

Lucid's Achievements

  1. Ward, Is there any chance you could take a look into your AES.au3 code and see what it would take to get it to work when compiling to an x64 executable? I ran into an issue when using RTFC's CodeCryptor (https://www.autoitscript.com/forum/topic/155538-codecrypter-encrypt-your-script/). Everything works just fine when compiling to x86. It's just x64 that's causing me an issue (and of course, the bit of code I'm working on HAS to be x64). Thanks for all the hard work you did on everything! It's helped a TON!
  2. RTFC, thanks for the speedy reply! Right now I just have a super small bit of code that needs to be encrypted. So I don't think speed will be an issue. Do you have any suggestions on alternate algorithms that would work well with CodeCrypter? At least something to help me get my utility out the door and buy me time to try and track down Ward and ask him about the AES.au3 stuff...
  3. I'm running into a problem using MCFinclude.au3 and am hoping RTFC or someone can shed some light... If I add the MCFinclude.au3 to an AutoIt script on my 64-bit Windows 10 box, it blows up when running as a 64-bit process. For example, if I use this piece of code: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=testing_x86.exe #AutoIt3Wrapper_Outfile_x64=testing_x64.exe #AutoIt3Wrapper_Compile_Both=y #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <MCFinclude.au3> Msgbox(64, "test", "testing, testing, 1,2,3...") When I just select Tools | Go, I get the message that Autoit has stopped working, and a return code of -1073741819 Any idea of what I might need to adjust in order to get this working under 64-bit Windows 10? And it's only if I select to compile it as an x64 target. x86 seems just fine (or just commenting out the include). Thanks for all the hard work on this UDF!
  4. I poked around on the forum, and asked Dr. Google his advice, but I'm coming up empty, and am not able to figure something out. So I was hoping someone here could shed some light for me. I'm trying to use GDI+ to create a custom GUI that sort of mimics the borderless alert notification window that is seen on Windows 10 (see included pic). I can get some embedded images to show, but I can't seem to get embedded images + text + a close "X" button to all show/work at the same time. I know there's the Metro GUI UDF, but I'm wanting just the bare bones code, and don't need a full UDF. So does anyone happen to have an example, or can give me some advice? Thanks! (going back to digging into other examples I previously found)
  5. mLipok, thanks for the example and links! That helped me get it figured out.
  6. First off, sorry if this is something that has been answered somewhere on the forum. I've been poking around for a while and have come up empty. My brain also is not wanting to wrap around an issue I'm having. I've got a large number of XML data that I have to parse in order to pull out specific bits of info from each. I can't seem to figure out the code to get the child nodes I need (my XML lingo is a little fuzzy too) Here is an example of the XML I'm trying to read: <?xml version="1.0" encoding="UTF-8"?><computer><general><id>000</id><name>MyMachine</name></general><software><licensed_software><name>Adobe Acrobat Pro XI</name><name>Adobe Acrobat X</name><name>Adobe Illustrator CS6</name><name>Google Chrome</name><name>Microsoft Office</name></licensed_software></software></computer> And here is a code snippet I've been messing with to try and figure out what my problem/solution is: Local $oXML = ObjCreate("Microsoft.XMLDOM") $oXML.setProperty("SelectionLanguage", "XPath") ;$oXML.loadxml(<DataReturnedFromAnotherQueryFromREST>) ;I'm reading from a stream and not an actual file in production $oXML.load("MySampleFile.xml") ;Loading an actual file is just for testing purposes Local $oItem = "" Local $oSoftware = $oXML.selectNodes("//software/licensed_software") For $oItem In $oSoftware ConsoleWrite("This spits out a glob of squished together info: " & $oItem.text & @CRLF) Next So how do I pull out each "name" node so they're separate and not globbed together? I've tried using selectSingleNode and some other variations, and I can't seem to get what I need. Can someone shed some light on what I'm overlooking (I have a feeling it's pretty simple). Thanks!
  7. Nevermind! Totally my fault - got a number in the wrong spot in my test. Thanks UEZ! I think I'm able to move forward and try understanding/adapting your code.
  8. Thanks for the speedy reply UEZ! I guess I'm not being clear. So what I'm trying to figure out how to do is to make an image semi-transparent on top of the background of the GUI (so you can see the background through the semi-transparent image). In the included pics, you can see that the red Torus ring is 100% in the one, but in the other the ring is like 55% transparent and the blue background shows through. How can I accomplish this with GDI+ using a PNG file? Thanks! And sorry for not being clear enough in my first post.
  9. Sorry for not being clear. I'm looking to be able to alter the transparency of the image, but keep the background of the GUI visible. So in UEZ's example, if I add "GUISetBkColor(0x000000, $hGUI)" I don't see the black background I'd expect to see. I've been trying to work my way through the code and understand what it's doing, but I'm coming up with a few blanks. How can I have a semi-transparent image on top of the GUI, but still be able to see the GUI background? Thanks!
  10. I'm having problems getting my brain to work, and I can't find anything to help me get moving on the web - so I was hoping someone here could nudge me in the right direction. I'm trying to be able to change the opacity of a bitmap using GDI+ (the source files are all .PNG). So at times it's fully opaque, and others it's faded out. Below is a sample bit of code. How can I get the bitmap to look semi-transparent? Thanks! #include <GUIConstantsEx.au3> #include <GDIPlus.au3> #include <GUIConstants.au3> #include <ColorConstantS.au3> #include <WinAPIGdi.au3> #include <WindowsConstants.au3> AutoItSetOption("MustDeclareVars", 1) _GDIPlus_Startup() Local $hGUI = GUICreate("test", 400, 300, -1, -1, $WS_POPUP, $WS_EX_LAYERED) GUISetBkColor(0x000000, $hGUI) Local $hImage = _GDIPlus_ImageLoadFromFile("AnyPNGFile.png") Local $iWidth = _GDIPlus_ImageGetWidth($hImage) Local $iHeight = _GDIPlus_ImageGetHeight($hImage) Local $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) ; how can I dynamically change the opacity of the bitmap? Local $hPicCtrl = GUICtrlCreatePic("", 0, 0, $iWidth, $iHeight) _SetBitmapToCtrl($hPicCtrl, $hBitmap) GUICtrlSetState ($hPicCtrl, $GUI_SHOW) GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE _GDIPlus_Shutdown() Exit EndSwitch WEnd Func _SetBitmapToCtrl($CtrlId, $hBitmap) Local Const $STM_SETIMAGE = 0x0172 Local Const $IMAGE_BITMAP = 0 Local Const $SS_BITMAP = 0xE Local Const $GWL_STYLE = -16 Local $hWnd = GUICtrlGetHandle($CtrlId) If $hWnd = 0 Then Return SetError(1, 0, 0) ; set SS_BITMAP style to control Local $oldStyle = DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $hWnd, "int", $GWL_STYLE) If @error Then Return SetError(2, 0, 0) DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $hWnd, "int", $GWL_STYLE, "long", BitOR($oldStyle[0], $SS_BITMAP)) If @error Then Return SetError(3, 0, 0) Local $oldBmp = DllCall("user32.dll", "hwnd", "SendMessage", "hwnd", $hWnd, "int", $STM_SETIMAGE, "int", $IMAGE_BITMAP, "int", $hBitmap) If @error Then Return SetError(4, 0, 0) If $oldBmp[0] <> 0 Then _WinAPI_DeleteObject($oldBmp[0]) Return 1 EndFunc
  11. I can change the value and such just fine. And the code works just fine on one test machine running Windows PE (and my older code has run on several hundred instances of Windows PE without a hiccup). It just seems to blow up on another, newer test PC running the exact same 64-bit Windows PE environment (32-bit seems to be just fine on both machines). If I compile with an older version of Autoit, it works just fine on both machines. So just getting a success on a single machine isn't an indicator that the x64 compiled code is working. Sorry, all I can say is that to me, this seems to point at either the hardware or Autoit as being the culprit. I'm functioning fine after dropping back to the older Autoit, so I just wanted to share the above for anyone else experiencing weirdness too. And if anyone has any ideas they want me to try, I'm happy to do so.
  12. After doing more tests, it seems that the AD UDF is fine, but there's a bug or something when using Autoit 3.3.14.2 with SciTE 3.6.0 that only shows up in a specific scenarios/machines. I went back and compiled my test code with an older version of Autoit and SciTE and it worked just fine: https://www.autoitscript.com/forum/topic/178622-odd-math-results/ So thanks Water for helping me at least get to the bottom of the weirdness! Guess I'll just stick with compiling with older AutoIt for the time being...
  13. czardas, the code in my first post IS the code that causes the error. And yes, I know it's aggravating and seems odd that it blows up - it works on one machine, but not another. I went back and did more tests and think this is some sort of bug with using Autoit 3.3.14.2 with SciTE 3.6.0. If I compile that same code from my first post using AutoIt 3.3.12.0 with SciTE 3.4.4 it works just fine with no errors.
  14. The error message that pops up is: TITLE: AutoIt v3: Test.exe - Application Error MESSAGE: The exception Illegal Instruction An attempt was made to execute an illegal instruction. (0xc000001d) occurred in the application at location 0x00007FF6CE279FD1. Click OK to terminate the program
  15. I'm hoping someone can shed some light on something for me... I've got a larger block of code that is hiccupping, and I narrowed it down to what seems to be an offending piece of math. If I compile the following code for x64, and I run it under 64-bit Windows PE, it works just fine on a Dell OptiPlex 980. However, if I boot up into the exact same 64-bit Windows PE environment on a new Dell OptiPlex 7020, it causes an illegal exception. What gives? Is there some sort of hardware, RAM, or BIOS setting that makes the math not work out, or spit out some odd integer that the message box can't handle or something? I'm weak on high level math, so maybe I'm overlooking something obvious? Can anyone help shed some light on this? Thanks! #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile_x64=Test.exe #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Global $iHigh = 669650608 * 2 ^ 32 MsgBox(64, "testing", $iHigh)I'm using Autoit 3.3.14.2 with SciTE 3.6.0
×
×
  • Create New...