All Activity
- Today
-
It's looking for a registry key to determine the local version, as per the PowerShell script provided, I used... Global $g_RustDesk_RegPath = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RustDesk" Global $g_RustDesk_RegKey = "Version" What value do you have at that location?
-
Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. The Moderation team
-
What'd you mean activate a window? I thought it just runs in the tray to the bottom right when the script is run? Or does it have anything to do with games being fullscreen and it getting separated from that? Now there's another variation where the F1 is sent but the Space is not. Hell, I didn't need this
-
So long story short, I'm trying to make a script for an infinite loop consisting of 2 button presses (F1 then spacebar about 2-3 seconds after) every 5 or so minutes (for game XP farming). I tried the below script and I'm having a bit of trouble. Sometimes it wouldn't run and would require 3-4 resets, sometimes it'd only loop a few times. What am I doing wrong?
-
Metadeth joined the community
-
You could use my Multi-Thread UDF this way : #include <Constants.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <GUIConstants.au3> #include "..\Files\PMT-UDF.au3" Opt("MustDeclareVars", True) Global $GUI_HWNDPARENT Global $GUI_HWNDPARENT_Width = 786 Global $GUI_HWNDPARENT_Height = 502 Global $GUI_HWNDPARENT_Event_Message Global $BTN_Close Global $BTN_Maximize Global $BTN_Minimize Global $LBL_Loop_Value _PMT_Init() _Display_Page__Downloading() Func _Display_Page__Downloading() $GUI_HWNDPARENT = GUICreate("like multi-threading", $GUI_HWNDPARENT_Width, $GUI_HWNDPARENT_Height, -1, -1, $WS_POPUPWINDOW) $BTN_Close = GUICtrlCreateButton("Close", $GUI_HWNDPARENT_Width - 77, 0, 76, 38) $BTN_Maximize = GUICtrlCreateButton("Maximize", $GUI_HWNDPARENT_Width - 77 - 76, 0, 76, 38) $BTN_Minimize = GUICtrlCreateButton("Minimize", $GUI_HWNDPARENT_Width - 77 - 76 - 76, 0, 76, 38) $LBL_Loop_Value = GUICtrlCreateLabel('Test', 300, 300, 100, 20) GUISetState(@SW_SHOW) WinSetOnTop($GUI_HWNDPARENT, "", $WINDOWS_ONTOP) Local $hProc1 = _PMT_Start("_Downloading"), $sResponse While 1 $GUI_HWNDPARENT_Event_Message = GUIGetMsg() Select Case $GUI_HWNDPARENT_Event_Message = $BTN_Maximize WinSetState($GUI_HWNDPARENT, "", @SW_MAXIMIZE) ContinueLoop Case $GUI_HWNDPARENT_Event_Message = $BTN_Minimize WinSetState($GUI_HWNDPARENT, "", @SW_MINIMIZE) ContinueLoop Case $GUI_HWNDPARENT_Event_Message = $GUI_EVENT_CLOSE Or _ $GUI_HWNDPARENT_Event_Message = $BTN_Close Exit EndSelect If $hProc1 Then $sResponse = _PMT_GetResponse($hProc1) If @error Then MsgBox($MB_OK, "Error", "Process has dropped") $hProc1 = 0 ContinueLoop EndIf If $sResponse Then If StringInStr($sResponse, "DONE") Then MsgBox($MB_OK + $MB_TOPMOST, "Success", $sResponse & @CRLF) $hProc1 = 0 Else GUICtrlSetData($LBL_Loop_Value, $sResponse) EndIf EndIf EndIf WEnd EndFunc ;==>_Display_Page__Downloading Func _Downloading() MsgBox($MB_OK + $MB_TOPMOST, "Starting", "Thread") For $i = 1 To 50 Step +1 ConsoleWrite($i) Sleep(500) Next MsgBox($MB_SYSTEMMODAL + $MB_TOPMOST, "", "FOR,Next DONE!") Return "a somewhat long message if you need to send inforation to the caller when you are DONE" EndFunc ;==>_Downloading
-
I hope i didn,t misunterstood your problem: Where is a small demo source for the second threat? Why is a second thread necesarry as it seems you prefer to do one job (dl a page) and after finished doing the next job? Adlibregister could be very helpfull just look this small demo: #ingclude <GUIConstantsEx.au3> #include <GUIConstants.au3> #include <ListviewConstants.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <GuiListView.au3> ConsoleWrite(Sqrt(1.07*1.07+1.27*1.27)&@crlf) ;TCPStartup() Global $aServers[1][3], $sTitle = "Serverstatus " Global $iPing, $iAct, $iRepeat, $iMaxRepeat = 5 ;If Not FileExists('conf.ini') Then FileWriteLine('conf.ini','autoit.de| #Region Gui $hGuiMain = GUICreate($sTitle, 248, 318, 192, 142) $idMnu_file = GUICtrlCreateMenu("File") $idMnu_file_test = GUICtrlCreateMenuItem("test", $idMnu_file) $idMnu_file_close = GUICtrlCreateMenuItem("Close", $idMnu_file) $idMnu_edit = GUICtrlCreateMenu("Edit") $idMnu_edit_conf = GUICtrlCreateMenuItem("Preferences", $idMnu_edit) $idMnu_help = GUICtrlCreateMenu("?") $idLV_Server = GUICtrlCreateListView("Name|Adresse|Port|Ping", 5, 5, 238, 288, $LVS_SORTASCENDING) _GUICtrlListView_SetColumnWidth($idLV_Server, 0, 80) _GUICtrlListView_SetColumnWidth($idLV_Server, 1, 100) _GUICtrlListView_SetColumnWidth($idLV_Server, 2, 0) ;unsichtbar _GUICtrlListView_SetColumnWidth($idLV_Server, 3, $LVSCW_AUTOSIZE_USEHEADER) GUISetState(@SW_SHOW, $hGuiMain) $hGuiConf = GUICreate("Preferences", 500, 425) $idTab_conf = GUICtrlCreateTab(10, 10, 480, 405) $idTab_conf_servers = GUICtrlCreateTabItem("Servers") GUICtrlCreateGroup("Server Hinzufügen", 30, 35, 135, 185) $idLbl_name = GUICtrlCreateLabel("Name:", 40, 60) $idInp_name = GUICtrlCreateInput("", 50, 75, 100, 20) $idLbl_adresse = GUICtrlCreateLabel("Adresse:", 40, 105) $idInp_adresse = GUICtrlCreateInput("", 50, 120, 100, 20) GUICtrlCreateLabel("Port:", 40, 145) $idInp_port = GUICtrlCreateInput("", 50, 160, 100, 20) $idBtn_addserver = GUICtrlCreateButton("Add", 70, 185, 50) $idLstServer = GUICtrlCreateList("", 180, 40, 150, 190) $idBtn_delete = GUICtrlCreateButton("Löschen", 205, 240) GUICtrlCreateTabItem("") #EndRegion Gui _getServers() _GUICtrlListView_RegisterSortCallBack($idLV_Server) While 1 $msg = GUIGetMsg(1) Switch $msg[1] Case $hGuiMain Switch $msg[0] Case $GUI_EVENT_CLOSE, $idMnu_file_close _GUICtrlListView_UnRegisterSortCallBack($idLV_Server) Exit Case $idMnu_edit_conf GUISetState(@SW_SHOW, $hGuiConf) Case $idMnu_file_test $iAct = -1 _PingIt() Case $idLV_Server _GUICtrlListView_SortItems($idLV_Server, GUICtrlGetState($idLV_Server)) $iAct = -1 $iRepeat = 0 EndSwitch Case $hGuiConf Switch $msg[0] Case $GUI_EVENT_CLOSE GUISetState(@SW_HIDE, $hGuiConf) _getServers() $iAct = -1 Case $idBtn_addserver $name = GUICtrlRead($idInp_name) $adresse = GUICtrlRead($idInp_adresse) $port = GUICtrlRead($idInp_port) $read2 = IniReadSectionNames("conf.ini") $count = UBound($read2) - 1 IniWrite("conf.ini", $name, "adresse", $adresse) IniWrite("conf.ini", $name, "port", $port) GUICtrlSetData($idInp_name, "") GUICtrlSetData($idInp_adresse, "") GUICtrlSetData($idInp_port, "") Case $idBtn_delete $read3 = GUICtrlRead($idLstServer) IniDelete("conf.ini", $read3) EndSwitch EndSwitch WEnd Func _getServers() Local $aTmp = IniReadSectionNames("conf.ini") _ArraySort($aTmp, 0, 1) Local $aData _GUICtrlListView_DeleteAllItems($idLV_Server) ReDim $aServers[$aTmp[0] + 1][2] For $i = 1 To $aTmp[0] $aData = IniReadSection("conf.ini", $aTmp[$i]) $aServers[$i][0] = GUICtrlCreateListViewItem($aTmp[$i] & '|' & $aData[1][1] & '|' & $aData[2][1], $idLV_Server) $aServers[$i][1] = $aTmp[$i] ; $aServers[$i][2]=$aData[1] ; $aServers[$i][3]=$aData[2] Next ; _ArrayDisplay($aServers) EndFunc ;==>_getServers Func _PingIt() AdlibUnRegister('_PingIt') ;first disable $iAct += 1 WinSetTitle($hGuiMain, '', $sTitle & $iRepeat+1) Local $aItem = _GUICtrlListView_GetItemTextArray($idLV_Server, $iAct) Local $iItem = _ArraySearch($aServers, $aItem[1]) ;Server aus Listview im Array suchen ConsoleWrite($iAct & @TAB & $aItem[1] & @TAB) $iPing = Ping($aItem[2]) If @error Then $iPing = 99999 ;für nicht erreichbar nötig wegen Sortiermöglichkeit ConsoleWrite($iPing & @CRLF) GUICtrlSetData($aServers[$iItem][0], '|||' & StringFormat('%5s', $iPing)) Switch $iPing ;Farben je nach Ping Case 0 To 24 GUICtrlSetBkColor($aServers[$iItem][0], 0x22C21F) GUICtrlSetColor($aServers[$iItem][0], 0x0) Case 25 To 549 GUICtrlSetBkColor($aServers[$iItem][0], 0x00FF1F) GUICtrlSetColor($aServers[$iItem][0], 0x0) Case 550 To 999 GUICtrlSetBkColor($aServers[$iItem][0], 0x772200) GUICtrlSetColor($aServers[$iItem][0], 0xFFFFFF) Case Else GUICtrlSetBkColor($aServers[$iItem][0], 0xFF0000) GUICtrlSetColor($aServers[$iItem][0], 0xFFFFFF) EndSwitch If $iAct < _GUICtrlListView_GetItemCount($idLV_Server) - 1 Then AdlibRegister('_PingIt') ;don't forget to renable Else If $iRepeat < $iMaxRepeat - 1 Then $iAct = -1 $iRepeat += 1 #cs For $iItem = 0 To _GUICtrlListView_GetItemCount($idLV_Server) GUICtrlSetColor($aServers[$iItem][0], 0x000000) GUICtrlSetBkColor($aServers[$iItem][0], 0xFFFFFF) Next #ce AdlibRegister('_PingIt') ;don't forget to reenable EndIf EndIf EndFunc ;==>_PingIt happy new year and best wishes (auto)Bert
-
JBOpt joined the community
-
I have written a piece of code where it is necessary to separate the UI Thread from my code's Thread. Due to certain reasons, I cannot share the main code, but I will provide an example here. I want the UI to remain responsive while a function is executed that includes Sleep statements and For and While loops. This creates interference with the UI, causing it to freeze. I have tried several plugins, such as one that executes a secondary function on another Thread, but I encountered errors. Another approach involved executing the secondary function in a different process, but it was cumbersome, and after the function completed, I couldn’t display its output in the UI. Overall, I want to separate the UI Thread from the code Thread so that the UI doesn’t freeze. I should mention that I also used _Timer_SetTimer and AdlibRegister, but they were not effective. Here is a small example: running it will cause the UI to freeze until the For loop completes, even though it runs successfully. ;--------- Opt("MustDeclareVars", 1) #include-once #include <Constants.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <GUIConstants.au3> ;--------- ;--------- Global $GUI_HWNDPARENT Global $GUI_HWNDPARENT_Width = 786 Global $GUI_HWNDPARENT_Height = 502 Global $GUI_HWNDPARENT_Event_Message Global $BTN_Close Global $BTN_Maximize Global $BTN_Minimize Global $LBL_Loop_Value ;--------- _Display_Page__Downloading() Func _Display_Page__Downloading() $GUI_HWNDPARENT = GUICreate("like multi-threading", $GUI_HWNDPARENT_Width, $GUI_HWNDPARENT_Height, -1, -1, $WS_POPUPWINDOW) $BTN_Close = GUICtrlCreateButton("Close", $GUI_HWNDPARENT_Width - 77, 0, 76, 38) $BTN_Maximize = GUICtrlCreateButton("Maximize", $GUI_HWNDPARENT_Width - 77 - 76 , 0, 76, 38) $BTN_Minimize = GUICtrlCreateButton("Minimize", $GUI_HWNDPARENT_Width - 77 - 76 - 76, 0, 76, 38) $LBL_Loop_Value = GUICtrlCreateLabel('', 300, 300, 100, 20) GUISetState(@SW_SHOW) WinSetOnTop($GUI_HWNDPARENT, "", $WINDOWS_ONTOP) _Downloading() MsgBox($MB_SYSTEMMODAL, "", "Continue!") While 1 $GUI_HWNDPARENT_Event_Message = GUIGetMsg() Select Case $GUI_HWNDPARENT_Event_Message = $BTN_Maximize WinSetState($GUI_HWNDPARENT, "", @SW_MAXIMIZE) Continueloop Case $GUI_HWNDPARENT_Event_Message = $BTN_Minimize WinSetState($GUI_HWNDPARENT, "", @SW_MINIMIZE) Continueloop Case $GUI_HWNDPARENT_Event_Message = $GUI_EVENT_CLOSE OR _ $GUI_HWNDPARENT_Event_Message = $BTN_Close Exit EndSelect WEnd EndFunc Func _Downloading() For $i = 1 To 300 Step +1 GUICtrlSetData($LBL_Loop_Value, $i) Sleep(1000) Next MsgBox($MB_SYSTEMMODAL, "", "FOR,Next DONE!") EndFunc
-
tokyo-cat joined the community
-
Melba23 changed their profile photo
-
Problem with _StringEncrypt() in autoit and scite
water replied to angel83's topic in AutoIt General Help and Support
Please be so kind and post the error message you get. Seems like the function was removed way back in version 3.3.9.8. Please see the changelog as well: Removed: Documentation and example for _StringEncrypt(). Scripts should be updated to use the Crypt functions instead. Look at _Crypt_EncryptData() for an alternative example." -
It doesn't work for me with version 3.3.16.1 autoit and with Scite 4.4.6 it gives me an error, can you help me? #include <Date.au3> #include <String.au3> ; Put the name of your script here $sScript_Name = "Your_Script_Name_Here" ; This part writes the date to the registry the first time the script is run If RegRead("HKCU\Software\Microsoft\Windows\Current Version", $sScript_Name) = "" Then RegWrite("HKCU\Software\Microsoft\Windows\Current Version", $sScript_Name, "REG_SZ", _StringEncrypt(1, _NowCalc(), @ComputerName)) SetError(0) EndIf ; This part reads the encypted date from the registry $sStartDate = _StringEncrypt(0, RegRead("HKCU\Software\Microsoft\Windows\Current Version", $sScript_Name), @ComputerName) ; And this part decides if 30 days have passed! If _DateDiff("D", $sStartDate, _NowCalc()) > 30 Then MsgBox(0, $sScript_Name, "Your trial period has expired.") Exit EndIf ; And here is the rest of your script!!!!
-
Return to a specific point in another script
ioa747 replied to mr-es335's topic in AutoIt General Help and Support
command-line arguments are typically passed to a script when it is executed from a command prompt, a batch file, or a shortcut that includes arguments. take a look Comment-1540039 Comment-1503889 -
Return to a specific point in another script
mr-es335 replied to mr-es335's topic in AutoIt General Help and Support
ioa747, Thanks for the follow-up... May I ask where is the script are command-line arguments being passed? I have commented all but "GuiMainMenu()"...and I see no difference at all! -
Return to a specific point in another script
ioa747 replied to mr-es335's topic in AutoIt General Help and Support
sorry but I don't understand you (your sentence doesn't make sense, and when I translate it, the meaning is confusing - and it's certainly not your fault but my limited knowledge of English) but since you have the data, you can try it, and see if it's a correct assertion ; # more detailed explanation: If $CmdLine[0] > 0 Then ;This line checks if there are any command-line arguments passed to the script. ;$CmdLine[0] contains the count of command-line arguments. ;If it is greater than 0, it means that at least one argument has been provided when the script was executed. If $CmdLine[1] = "GuiGroup6" Then GuiGroup6() ;It checks if the first command-line argument (which is $CmdLine[1], since $CmdLine[0] is the count) is equal to the string "GuiGroup6". ;If this condition is true, it calls the function GuiGroup6(). Else ;It is executed if the condition $CmdLine[0] > 0 is false, meaning no command-line arguments were provided. GuiMainMenu() ;it calls the function GuiMainMenu(). EndIf DuckDuckGo+AI+Chat -
How can my UDF find dependency DLLs
emcodem replied to emcodem's topic in AutoIt General Help and Support
No i don't have any special or dedicated usage/installation scenario how in my mind, in best case my UDF can just be used like any Core Module and ideally, when users compile their scripts (which use my UDF) to exe, they don't have to think about my external dependency dlls but it just magically works. An installer can be done but it would from my perspective not be helpful for compiled deployment of users scripts. My current impression is that "embedding" my binaries into the au3 (e.g. as base64) will be the only option to "make it magically work". From there i either need to use some method like "Subrogation" (which might only work for a single dll but not a tree of dependencies) OR i dynamically dump the binaries to disk at runtime and include them from a temp location. If i remember correctly, we had massive issues with "BinaryCall" (isnt that very similar to subrogation?) which comes with some JSON au3, e.g. it was preventing windows from shutdown when it was used while shutdown was initiated (https://ffastrans.com/frm/forum/viewtopic.php?t=1184&hilit=shutdown). So i probably stick to the "Dump to disk" approach if nothing speaks against it? -
How can my UDF find dependency DLLs
argumentum replied to emcodem's topic in AutoIt General Help and Support
...so you want to install AutoIt3.exe with a script.au3 and run it that way ? If that is so, any installer or even compressor the creates executables can decompress in a temp folder, run your installer.au3 and that would be all you need. AutoIt is better than NSIS if you're more familiar with AutoIt. My 2 cents. Just an idea - Yesterday
-
How can my UDF find dependency DLLs
UEZ replied to emcodem's topic in AutoIt General Help and Support
Sorry, then I misunderstood your problem. As far as I understand your problem, RTFC's suggestion would be the best. There are a lot of portable programs with a setup routine. -
How can my UDF find dependency DLLs
emcodem replied to emcodem's topic in AutoIt General Help and Support
Thanks buddy, but not sure how this can be of help in my case. If this is only about finding out which dependencies there are then it might not really be related to my problem because it is about my own dll so i know the dependencies because i actively added all dependencies manually to the project. Also i know the dependencies of the dependencies because i usually analyze the stuff that i add to my code using dumpbin and similar tools. I need to do this because i must make sure that my final release is fully portable and also i want to know which OS versions i can support (looking at you, bcrypt.dll ^^). Wow, that looks like a lot of work you did there! Thanks a lot, even when i think that an installer is not really a fit for my Mongo Driver project i'll check out how you do it because i was not really happy with the NSIS stuff in the past, i mean it works but it does not provide much convenience functions from my perspective. -
Return to a specific point in another script
mr-es335 replied to mr-es335's topic in AutoIt General Help and Support
ioa747, I did as you suggested...thanks. I gather that...the following command being "focused' on the command line, would be the reasoning behind the employment of the "If|Then" statement? Would this be a correct assertion? Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & @ScriptDir & '\Script1.au3" GuiGroup6') -
UEZ changed their profile photo
-
How can my UDF find dependency DLLs
UEZ replied to emcodem's topic in AutoIt General Help and Support
I wrote this function to list the imports of a DLL. ;Coded by UEZ build 2024-06-09 #AutoIt3Wrapper_UseX64=n #include <Array.au3> #include <Debug.au3> #include <String.au3> #include <WinAPIFiles.au3> #include <WinAPIProc.au3> #include <WinAPIRes.au3> #include <WinAPISys.au3> Const $IMAGE_DIRECTORY_ENTRY_IMPORT = 1 Global $sFile = FileOpenDialog("Select a DLL file", "", "DLL (*.dll)", $FD_FILEMUSTEXIST) If @error Then Exit Global $a = _WinAPI_GetBinaryType2($sFile) Global $b = _WinAPI_GetBinaryType2(_WinAPI_GetProcessFileName()) If $a <> $b Or $a = "Error" Or $b = "Error" Then Exit MsgBox($MB_ICONERROR, "Error", "Script and DLL have not same binary type!", 10) Global $i, $aResult = _WinAPI_ListDLLImports($sFile) _DebugArrayDisplay($aResult, StringRegExpReplace($sFile, ".+\\(.+)", "$1") & " imports") Func _WinAPI_ListDLLImports($sFile, $iLevel = 1, $bRec = False, $bDisplayLocalFilesOnly = True, $iMaxRecLevel = 10) If $iLevel > $iMaxRecLevel Then Return Local Const $hModule = _WinAPI_LoadLibraryEx($sFile, BitOR($DONT_RESOLVE_DLL_REFERENCES, $LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR)) If Not $hModule Then Return SetError(1, 0, 0) Local Const $tSize = DllStructCreate("ulong bytes") ;https://learn.microsoft.com/en-us/windows/win32/api/dbghelp/nf-dbghelp-imagedirectoryentrytodata Local Const $aReturn = DllCall("Dbghelp.dll", "ptr", "ImageDirectoryEntryToData", "ptr", $hModule, "boolean", True, "ushort", $IMAGE_DIRECTORY_ENTRY_IMPORT, "struct*", $tSize) If Not IsArray($aReturn) Or @error Then _WinAPI_FreeLibrary($hModule) Return SetError(2, 0, 0) EndIf If Not $aReturn[0] Then _WinAPI_FreeLibrary($hModule) Return SetError(3, 0, 0) EndIf Local $tIMAGE_IMPORT_DESCRIPTOR, $sDLLName, $sPath = StringRegExpReplace($sFile, "(.+\\).+", "$1"), $sFN, $i = 0, $sDLL = StringRegExpReplace($sFile, ".+\\(.+)", "$1") Static $sDLLFiles = "" ConsoleWrite(_StringRepeat(@TAB, $iLevel - 1) & $sDLL & @CRLF) If $iLevel > 1 Then $sDLLFiles &= $sDLL & "|" While 1 $tIMAGE_IMPORT_DESCRIPTOR = DllStructCreate("dword dummy;dword TimeDateStamp;dword ForwarderChain;dword Name;dword FirstThunk;", $aReturn[0] + $i) If Not $tIMAGE_IMPORT_DESCRIPTOR.FirstThunk Then _WinAPI_FreeLibrary($hModule) If $iLevel = 1 Then Local $aResult = StringSplit(StringTrimRight($sDLLFiles, 1), "|", 2) $aResult = _ArrayUnique($aResult, 0, 0, 0, $ARRAYUNIQUE_NOCOUNT) _ArraySort($aResult) Return $aResult EndIf Return Else $sDLLName = _WinAPI_WideCharToMultiByte(DllStructCreate("char s[256];", $hModule + $tIMAGE_IMPORT_DESCRIPTOR.name).s, 65001) $sFN = $sPath & $sDLLName If $bRec Then If FileExists($sFN) Then $iLevel += 1 _WinAPI_ListDLLImports($sFN, $iLevel) $iLevel -= 1 Else If Not $bDisplayLocalFilesOnly Then $sDLLFiles &= $sDLLName & "|" ConsoleWrite($iLevel & ":" & _StringRepeat(@TAB, $iLevel) & $sDLLName & @CRLF) EndIf Else ConsoleWrite($iLevel & ":" & _StringRepeat(@TAB, $iLevel) & $sDLLName & @CRLF) If Not $bDisplayLocalFilesOnly Then $sDLLFiles &= $sDLLName & "|" Else If FileExists($sFN) Then $sDLLFiles &= $sDLLName & "|" EndIf EndIf Endif $i += DllStructGetSize($tIMAGE_IMPORT_DESCRIPTOR) WEnd EndFunc ; #FUNCTION# ==================================================================================================================== ; Author.........: UEZ ; Modified.......: ; =============================================================================================================================== Func _WinAPI_GetBinaryType2($sFile) Local $hFile = _WinAPI_CreateFile($sFile, 2, 2, 2) If Not $hFile Or @error Then Return SetError(1, 0, 0) Local $hMapping = _WinAPI_CreateFileMapping($hFile, 0, Null, $PAGE_READONLY, Null) If Not $hMapping Then _WinAPI_CloseHandle($hFile) Return SetError(2, 0, 0) EndIf Local Const $pAddress = _WinAPI_MapViewOfFile($hMapping, 0, 0, $FILE_MAP_READ) If Not $pAddress Or @error Then __ReturnGBT2($hMapping, $hFile, 3) Local Const $aHeader = DllCall("Dbghelp.dll", "ptr", "ImageNtHeader", "ptr", $pAddress) If @error Or IsArray($aHeader) = 0 Then Return __ReturnGBT2($hMapping, $hFile, 4) Local Const $tIMAGE_NT_HEADERS = DllStructCreate("dword Signature;ptr FileHeader;ptr OptionalHeader;", $aHeader[0]) If @error Or Not IsDllStruct($tIMAGE_NT_HEADERS) Then Return __ReturnGBT2($hMapping, $hFile, 5) Local Const $tIMAGE_FILE_HEADER = DllStructCreate("word Machine;word NumberOfSections;dword TimeDateStamp;dword PointerToSymbolTable;dword NumberOfSymbols;word SizeOfOptionalHeader;word Characteristics;", _ DllStructGetPtr($tIMAGE_NT_HEADERS) + 4) If @error Or Not IsDllStruct($tIMAGE_FILE_HEADER) Then Return __ReturnGBT2($hMapping, $hFile, 6) __ReturnGBT2($hMapping, $hFile, 0) Switch $tIMAGE_FILE_HEADER.Machine Case 0x014c Return "x86" Case 0x0200 Return "Intel Itanium" Case 0x8664 Return "x64" Case Else Return "Error" EndSwitch EndFunc ;==>_WinAPI_GetBinaryType2 Func __ReturnGBT2(Byref $hMapping, ByRef $hFile, $iError) _WinAPI_CloseHandle($hMapping) _WinAPI_CloseHandle($hFile) If $iError Then Return SetError($iError, 0, 0) EndFunc ;==>__ReturnGBT2 -
Return to a specific point in another script
ioa747 replied to mr-es335's topic in AutoIt General Help and Support
check the in help file for "Command Line Parameters" -
Chlaudiu reacted to a post in a topic: Forum login requires now the use of your Email address
-
Return to a specific point in another script
mr-es335 replied to mr-es335's topic in AutoIt General Help and Support
ioa747, Thanks for this...appreciated...as always! May I ask, what this portion is doing? If $CmdLine[0] > 0 Then If $CmdLine[1] = "GuiGroup6" Then GuiGroup6() Else GuiMainMenu() EndIf Also, an interesting way of returning to the calling script!! Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & @ScriptDir & '\Script1.au3" GuiGroup6') -
mr-es335 reacted to a post in a topic: Return to a specific point in another script
-
How can my UDF find dependency DLLs
RTFC replied to emcodem's topic in AutoIt General Help and Support
yap, this one for example. -
Return to a specific point in another script
ioa747 replied to mr-es335's topic in AutoIt General Help and Support
First off, a "Happy New Year!" to you too