All Activity

This stream auto-updates   

  1. Past hour
  2. Maybe you can just use this : #include <WinAPI.au3> If _IsAutoItGUIMode() Then MsgBox(0, "", "GUI Mode") Else ConsoleWrite("CUI Mode") EndIf Func _IsAutoItGUIMode() Local $iStdHandle = _WinAPI_GetStdHandle ( 2 ) Return ($iStdHandle And @Compiled) ? 0 : 1 EndFunc
  3. Ok. So I understood your post and the text following your link wrong: "At offset 60 (0x3C) from the beginning of the DOS header is a pointer to the Portable Executable (PE) File header." I thought DOS header is fixed. Ok, so I have first to search the offset of PE header in my script and then add offset to cui/gui byte +92 (+5C). I'll will try it. Til now I didn't search inside a file in hex but I will find out. Thanks, Conrad
  4. What do you mean with "should"? The offset depends on the the length of the dos-header. So there doesn't exist a fixed offset.
  5. Tweaked for the last time #include <StringConstants.au3> Local $s_Delete = InputBox("Enter", "Enter what you want to delete") If @error Then Exit Local $h_FileOpen = FileOpen(@ScriptDir & "\TXT.txt", 2) FileWrite($h_FileOpen, StringRegExpReplace(StringRegExpReplace(StringReplace(FileRead(@ScriptDir & "\OLD\TXTOLD.txt"), $s_Delete, ''), "(?m)^\s*$\R?", ""), '(?m)^\s+|\s+\Z', '')) FileClose($h_FileOpen)
  6. Very interesting I read your link. But in my scripts with v 3.3.14.2 PE header starts at offset 272 (0x110). When I follow this pointer +92 (+5C) then I exactly found the correct result 0x02 for GUI and 0x03 for CUI. Complete offset is 364 (0x16C) as I found out earlier. But why is the offset to PE header larger than it should? Conrad
  7. Not a built in one that I'm aware of. I'm creating a connection component utilizing AutoIt, which they seem to heavily recommend for things like this.
  8. Today
  9. snip. don't know. your requirements seem weird to me. why can't everyone have an icon? even just a '-' character? I see no clipping in the example that you got your code from in the Help file
  10. another one Local $s = @CRLF & "One" & @CRLF & @CRLF & "Two" & @CRLF & "Three" & @CRLF & @CRLF & _ "Four" & @CRLF & "" & @CRLF & "Five" & @CRLF & "Six" & @CRLF & "" & @CRLF & "" & @CRLF ConsoleWrite( StringRegExpReplace($s, "^\R+|\R+$|\R\K\R+", "") )
  11. Offset does not mean that it counts from the beginning of the file, but from the beginning of the PE header. At offset 60 (0x3C) is a pointer where the PE header starts in the file. Follow this pointer and from there, the offset should be +92 (+5C) for x86 files. I have just tested this with a file and got the correct result 0x02. Here you can research more about the structure of PE files: https://en.wikibooks.org/wiki/X86_Disassembly/Windows_Executable_Files
  12. you didn't search very hard
  13. Does CyberArk provide an API to handle such cases?
  14. I'm doing this through CyberArk so I don't want the users ever having access to the actual password themselves and it would allow the session to be recorded for review.
  15. That doesn't make it function either unfortunately.
  16. I don't even have that .msc file so I can't test. Water is 100% right
  17. Why automate the GUI? Use my AD UDF to directly access Active Directory.
  18. Perhaps add #RequireAdmin keyword at the top of the script?
  19. Hi guys, I've been trying different methods of getting dsa.msc (Active Directory Users and Computers) running using AutoIt through CyberArk. I've tried several different methods and just can't seem to get it to launch when I test it locally and explicitly filling in the password and username variables. I even tried creating batch file that would launch dsa.msc and call that batchfile with the Runas command within AutoIt, but no luck. My current script is: Dsamsc() Func Dsamsc() Local $sUserName = "actualusername" Local $sPassword = "actualpassword>" ;Command to run batch file that will run dsa.msc as target user from CyberArk Local $iPID = RunAs($sUserName, @ComputerName, $sPassword, "dsamsc.bat", "", @SW_SHOWMAXIMIZED) WinWait("[CLASS:MMCMainFrame]", "", 10) ProcessClose($iPID) EndFunc I've tried changing the launch command to 'c:\windows\system32\mmc.exe "dsa.msc"' as well with no luck. Any help or advice in getting this done would be greatly appreciated.
  20. Hi. Sorry for necroposting but I exactly was looking for this. I tried it out and I put my compiled scripts in a hex editor. Value at position 0x154 is always 0x0. I think there will be a lot of changes since that AutoIt version. I guess the $magicPosition in version 3.3.14.2 is 0x16C. Can someone verifiy this? Regards, Conrad
  21. Hello. I'm interested the coding and decoding for text with the help of B58 format. I found this encoder is implemented using javascript: https://www.browserling.com/tools/base58-encode Maybe someone already did something like that in Autoit? I would appreciate for help. Thanks.
  22. Perfect, That is exactly what I was looking for. Thanks Jos!
  23. Like this?: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <EditConstants.au3> #include <MsgBoxConstants.au3> ; Below is the GUI interface _DeploymentProcess() Func _DeploymentProcess() $aStep1 = GUICreate("Deployment Process", 475, 345, 500, 175) $CBcStep1 = GUICtrlCreateCheckbox("1. Step 01.", 15, 25, 300, 25) $BTNS1 = GUICtrlCreateButton("Email 01", 365, 25, 90, 20) $CBcStep2 = GUICtrlCreateCheckbox("2. Step 02.", 15, 50, 300, 25) $BTNS2 = GUICtrlCreateButton("Email 02", 365, 50, 90, 20) GUICtrlSetState($CBcStep2, $GUI_DISABLE) GUICtrlSetState($BTNS1, $GUI_DISABLE) $CBcStep3 = GUICtrlCreateButton("Hurray! You're Complete!", 85, 276, 300, 60) GUICtrlSetState($CBcStep3, $GUI_HIDE) ; Below are the button and checkbox enables/disables. GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete($aStep1) Return ; Step 1 Case $CBcStep1 If GUICtrlRead($CBcStep1) = $GUI_CHECKED Then GUICtrlSetState($BTNS1, $GUI_ENABLE) Else GUICtrlSetState($BTNS1, $GUI_DISABLE) EndIf Case $BTNS1 GUICtrlSetState($CBcStep2, $GUI_ENABLE) ; Step 2 Case $CBcStep2 If GUICtrlRead($CBcStep2) = $GUI_CHECKED Then GUICtrlSetState($BTNS2, $GUI_ENABLE) Else GUICtrlSetState($BTNS2, $GUI_DISABLE) GUICtrlSetState($CBcStep3, $GUI_HIDE) EndIf Case $BTNS2 GUICtrlSetState($CBcStep3, $GUI_SHOW) Case $GUI_EVENT_CLOSE, $CBcStep3 ; Exit EndSwitch WEnd EndFunc ;==>_DeploymentProcess Jos
  24. @akshatgupta you seem to have strolled right past the forum rules on your way in. I suggest you read them now, particularly the bit on game automation, and you will see why this thread is locked. wtfskins, dragonlore, etc. are all included in this. You will receive no assistance on this subject.
  25. i just attached my file to this so you can see the complete file wtfskins.au3
  26. Pretty sure it still isn't complete as I don't see any hotkeyset() and nowhere see $filewins set. Do yourseldf and us a favor and simply post the script that is runable as else we are guessing. Are you viewing the file will still being open or do you wait till the script ended and the file is closed? Jos
  27. Hello Everyone! I'm attempting to create a checklist app that performs other functions. For performance, I would like to check the box, then have the button to the right enabled. After that button is pressed, the second checkbox is enabled, and ready to be checked, allowing the second button to be pressed. After the second button is pressed, the completion/exit button is enabled/shown. I have my code that currently creates the GUI, creates the checkbox, but when you check it it enables the button and the next checkbox. Can't seem to figure out a Case for GUISetOnEvent. Any assistance would be appreciated! #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <EditConstants.au3> #include <MsgBoxConstants.au3> ; Below is the GUI interface _DeploymentProcess() Func _DeploymentProcess() $aStep1 = GUICreate("Deployment Process", 475, 345, 500, 175) $CBcStep1 = GUICtrlCreateCheckbox("1. Step 01.", 15, 25, 300, 25) $BTNS1 = GUICtrlCreateButton("Email 01", 365, 25, 90, 20) $CBcStep2 = GUICtrlCreateCheckbox("2. Step 02.", 15, 50, 300, 25) $BTNS2 = GUICtrlCreateButton("Email 02", 365, 50, 90, 20) GUICtrlSetState($CBcStep2, $GUI_DISABLE) GUICtrlSetState($BTNS1, $GUI_DISABLE) $CBcStep3 = GUICtrlCreateButton("Hurray! You're Complete!", 85, 276, 300, 60) GUICtrlSetState($CBcStep3, $GUI_SHOW) ; Below are the button and checkbox enables/disables. GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete($aStep1) Return ; Step 1 Case $CBcStep1 If GUICtrlRead($CBcStep1) = $GUI_CHECKED Then GUICtrlSetState($BTNS1, $GUI_ENABLE) GUICtrlSetState($CBcStep2, $GUI_ENABLE) Else GUICtrlSetState($BTNS1, $GUI_DISABLE) GUICtrlSetState($CBcStep2, $GUI_DISABLE) EndIf ; Step 2 Case $CBcStep2 If GUICtrlRead($CBcStep2) = $GUI_CHECKED Then GUICtrlSetState($BTNS2, $GUI_ENABLE) GUICtrlSetState($CBcStep3, $GUI_ENABLE) Else GUICtrlSetState($BTNS2, $GUI_DISABLE) GUICtrlSetState($CBcStep3, $GUI_DISABLE) EndIf Case $CBcStep3 If GUICtrlRead($CBcStep2) = $GUI_CHECKED Then GUICtrlSetState($BTNS10, $GUI_ENABLE) GUICtrlSetState($CBcStep3, $GUI_SHOW) Else GUICtrlSetState($CBcStep3, $GUI_EVENT_CLOSE) EndIf Case $GUI_EVENT_CLOSE, $CBcStep3 #comments-end Exit EndSwitch WEnd EndFunc
  1. Load more activity