Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/19/2025 in all areas

  1. It seems like a much cleaner solution to me.
    1 point
  2. my quick and dirty solution for x64 only scripts: RunAs64bit() Func RunAs64bit($iNoErrorStdOut = 1) If @AutoItExe = @ScriptFullPath Or @AutoItX64 Then Return If Not FileGetSize(StringTrimRight(@AutoItExe, 4) & "_x64.exe") Then Return SetError(1, 0, 1) ; one can never know as a coder ShellExecute(StringTrimRight(@AutoItExe, 4) & "_x64.exe", ($iNoErrorStdOut ? StringReplace($CmdLineRaw, "/ErrorStdOut ", "") : $CmdLineRaw)) Exit 101 ; remove /ErrorStdOut because you are not in SciTE anymore, ..or not. EndFunc ;==>RunAs64bit MsgBox(0, @ScriptName, "@AutoItX64 = " & @AutoItX64 & @LF & $CmdLineRaw, 30) Place this before anything else ( including #includes ) on your script and problem solved. My 2 cents
    1 point
  3. If you go to the link he gave for the discussion in AutoIt.de you'll find the "light installer" he wrote. Standard AutoIt3 distribution goes to the "x86" folder due to all the 32bit executables. He can use the 64bit path and, collision avoided Given that his tokenized files ( .a3x ) will be renamed to .a3x64, there is no inference. Also, he can give another naming convention to his distro like "AutoItLight" or what not, to not mess with the standard established by the original creator ( this forum ). I would add to the "light installer" he coded the AutoIt EULA too, because he is not installing his product but packaging someone else's product without written consent or abiding by the EULA of the original product ( AutoIt3 ) that states the the user can distribute any code the user made including executables, hence not the product itself ( AutoIt.exe ). So just the .au3 or .a3x or .exe produced by the AutoIt3 product as installed by the user from the creator's distribution site. More than you asked @ioa747 But @Schnuffel is likely to read this too
    1 point
  4. I tried it and it works. I added RegWrite("HKEY_CLASSES_ROOT\AutoIt3X64Script", "", "REG_SZ", "AutoIt v3 Encoded Script X64") RegWrite("HKEY_CLASSES_ROOT\AutoIt3X64Script\DefaultIcon", "", "REG_SZ", "C:\Program Files (x86)\AutoIt3\Icons\au3script_v11.ico") RegWrite("HKEY_CLASSES_ROOT\AutoIt3X64Script\Shell", "", "REG_SZ", "Run") RegWrite("HKEY_CLASSES_ROOT\AutoIt3X64Script\Shell\Run", "", "REG_SZ", "Run Script") RegWrite("HKEY_CLASSES_ROOT\AutoIt3X64Script\Shell\Run\Command", "", "REG_SZ", '"C:\Program Files (x86)\AutoIt3\AutoIt3_x64.exe" "%1" %*') RegWrite("HKEY_CLASSES_ROOT\.a3x64", "", "REG_SZ", "AutoIt3X64Script") Compiled #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile_type=a3x #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** MsgBox(0, @ScriptName, "AutoItVersion:" & @AutoItVersion & " " & (@AutoItX64 ? "X64" : "X86") ) I just changed the extension manually to .a3x64
    1 point
  5. ad777

    Image Pixel Search

    hello,so I decided to release my Image Pixel Search,i hope it help's you: it's similar to image seach. script made by:ad777 date modified:01/21/2025 log: #added Image_Searchv0.3.zip:improve performance of finding correct image #added Image_Searchv0.3.zip:script fixed download below: IMG_PSearchv0.2.zip Image_Searchv0.3.zip
    1 point
  6. argumentum

    _RunWaitEx() UDF

    ,,in the help area I gave some advice and oops !, ..it works for me because I extended the code but did not share it 😅 So here is the extended code that I call "UDF". Is not up to AutoIt UDF standards but, it runs. ( anyone willing to bring it up to standards, I'll edit this and place your version 😇 ) and here is the demo code #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_AU3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/sv /rm #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.16.1 #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include "_RunWaitEx.au3" ; https://www.autoitscript.com/forum/topic/212643-_runwaitex-udf/ ConsoleWriteWLineNumber('Version: ' & _RunWaitEx_Version() & @TAB & @error & @TAB & @extended & @CRLF) ;--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- Example_InTheLoop() Func Example_InTheLoop() ConsoleWrite(@CRLF & '+ Example_InTheLoop' & @CRLF & @CRLF) ConsoleWriteWLineNumber('DefaultLoopFunc: "' & _RunWaitEx_DefaultLoopFunc() & '"' & @TAB & @error & @TAB & @extended & @CRLF) ConsoleWriteWLineNumber('DefaultLoopFunc: "' & _RunWaitEx_DefaultLoopFunc(Example_InTheLoop) & '"' & @TAB & @error & @TAB & @extended & @CRLF) ConsoleWriteWLineNumber('DefaultLoopFunc: "' & _RunWaitEx_DefaultLoopFunc() & '"' & @TAB & @error & @TAB & @extended & @CRLF) ConsoleWriteWLineNumber('DefaultLoopFunc: "' & _RunWaitEx_DefaultLoopFunc("") & '"' & @TAB & @error & @TAB & @extended & @CRLF) ConsoleWriteWLineNumber('DefaultLoopFunc: "' & _RunWaitEx_DefaultLoopFunc() & '"' & @TAB & @error & @TAB & @extended & @CRLF) ConsoleWriteWLineNumber('DefaultLoopFunc: "' & _RunWaitEx_DefaultLoopFunc("Example_InTheLoop") & '"' & @TAB & @error & @TAB & @extended & @CRLF) ;~ ConsoleWriteWLineNumber('DefaultLoopFunc: "' & _RunWaitEx_DefaultLoopFunc(DontExtst) & '"' & @TAB & @error & @TAB & @extended & @CRLF) ConsoleWriteWLineNumber('DefaultLoopFunc: "' & _RunWaitEx_DefaultLoopFunc(MyLoopOrYours) & '"' & @TAB & @error & @TAB & @extended & @CRLF) ConsoleWriteWLineNumber('DefaultLoopFunc: "' & _RunWaitEx_DefaultLoopFunc() & '"' & @TAB & @error & @TAB & @extended & @CRLF) _RunWaitEx("Dir") _RunWaitEx_DefaultLoopFunc("") EndFunc ;==>Example_InTheLoop Func MyLoopOrYours($WhateverYouMayUseThisFor, $sStringFromCmdLine = "") ; the func needs to have 2 parameters #forceref $WhateverYouMayUseThisFor ConsoleWriteWLineNumber('' & @MIN & ':' & @SEC & '.' & @MSEC & @TAB & $sStringFromCmdLine & @CRLF) ;~ ProcessClose(_RunWaitEx_Last_iPID()) ;~ _RunWaitEx_ProcessClose(1) ; ..remember to set to zero afterwards EndFunc ;==>MyLoopOrYours ;--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- Example_InTheEditCtrl() Func Example_InTheEditCtrl() ConsoleWrite(@CRLF & '+ Example_InTheEditCtrl' & @CRLF & @CRLF) Local $iW = 600, $iH = 400 Local $hGUI = GUICreate("Example_InTheEditCtrl", $iW, $iH, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_TABSTOP)) Local $idEdit = GUICtrlCreateEdit("", 0, 0, $iW, $iH) GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKBOTTOM) GUISetState(@SW_SHOW) ConsoleWriteWLineNumber('DefaultConsoleWrite: "' & _RunWaitEx_DefaultConsoleWrite() & '"' & @TAB & @error & @TAB & @extended & @CRLF) ConsoleWriteWLineNumber('DefaultConsoleWrite: "' & _RunWaitEx_DefaultConsoleWrite(0) & '"' & @TAB & @error & @TAB & @extended & @CRLF) ConsoleWriteWLineNumber('DefaultCtrlEdit: "' & _RunWaitEx_DefaultCtrlEdit() & '"' & @TAB & @error & @TAB & @extended & @CRLF) ConsoleWriteWLineNumber('DefaultCtrlEdit: "' & _RunWaitEx_DefaultCtrlEdit($idEdit) & '"' & @TAB & @error & @TAB & @extended & @CRLF) ConsoleWriteWLineNumber('DefaultCtrlEdit: "' & _RunWaitEx_DefaultCtrlEdit() & '"' & @TAB & @error & @TAB & @extended & @CRLF) ; ..remember to set to zero afterwards _RunWaitEx("Dir") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete($hGUI) ExitLoop EndSwitch WEnd EndFunc ;==>Example_InTheEditCtrl ;--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- Func ConsoleWriteWLineNumber($sStr, $iLine = @ScriptLineNumber, $iError = @error, $iExtended = @extended) Local $iRet = ConsoleWrite('@@ (' & $iLine & ') : ' & $sStr) Return SetError($iError, $iExtended, $iRet) EndFunc ;==>ConsoleWriteWLineNumber so @daledale , please pardon my oops. On the bright side, you may find this ( what I meant ) useful, and hope it serves you in your project PS: there may be some comments that were true in the original snippet but not longer true/relevant. This is a spur-of-the-moment kind of post. Do uncomment and re-comment lines to mess with it, as a learning tool. You're gonna have to read the UDF to know what functions are available ( given my laziness ).
    1 point
  7. Well giving your full script with missing parts is not helping us very much. But since I am waiting for my car to get maintenance, here my take on what I think you want : #include <File.au3> #include <GUIConstants.au3> #include <InetConstants.au3> #include <GuiListView.au3> Opt("MustDeclareVars", True) Example() Func Example() Local $aDownList[20][6] Local $hGUI = GUICreate('Example', 600, 600, 200, 200, $WS_SIZEBOX) Local $idListView = GUICtrlCreateListView("ID|Status|File", 50, 20, 500, 400) _GUICtrlListView_SetColumnWidth($idListView, 1, 80) _GUICtrlListView_SetColumnWidth($idListView, 2, 300) Local $idDownload = GUICtrlCreateButton("Add DownLoad", 50, 500, 150, 25) GUISetState() Local $iIndex While True Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idDownload ;$iIndex = AddDown($aDownList, "http://www.autoitscript.com/autoit3/files/beta/update.dat", _TempFile(@ScriptDir, Default, ".txt", 10)) $iIndex = AddDown($aDownList, "https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3.zip", _TempFile(@ScriptDir, Default, ".zip", 10)) $aDownList[$iIndex][5] = GUICtrlCreateListViewItem($aDownList[$iIndex][0] & "|0.0%|" & $aDownList[$iIndex][3], $idListView) EndSwitch VerifyDownLoad($idListView, $aDownList) WEnd EndFunc ;==>Example Func AddDown(ByRef $aList, $sURL, $sFile) For $i = 0 To UBound($aList) - 1 If Not $aList[$i][0] Then ExitLoop Next If $i = UBound($aList) Then Return SetError(1) $aList[$i][0] = InetGet($sURL, $sFile, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND) $aList[$i][1] = 0 $aList[$i][2] = 0 $aList[$i][3] = $sFile $aList[$i][4] = $sURL Return $i EndFunc ;==>AddDown Func VerifyDownLoad($idLV, ByRef $aList) Local $sStatus, $iValue Local $tInfo = DllStructCreate($tagLVFINDINFO) $tInfo.Flags = $LVFI_PARAM For $i = 0 To UBound($aList) - 1 If Not $aList[$i][0] Then ContinueLoop If InetGetInfo($aList[$i][0], $INET_DOWNLOADCOMPLETE) Then $sStatus = "Complete" InetClose($aList[$i][0]) $aList[$i][0] = 0 Else $iValue = InetGetInfo($aList[$i][0], $INET_DOWNLOADREAD) If $iValue = $aList[$i][2] Then ContinueLoop If Not $aList[$i][1] Then $aList[$i][1] = InetGetInfo($aList[$i][0], $INET_DOWNLOADSIZE) $sStatus = StringFormat("%.1f%%", $iValue / $aList[$i][1] * 100) $aList[$i][2] = $iValue EndIf $tInfo.Param = $aList[$i][5] $iValue = _GUICtrlListView_FindItem($idLV, -1, $tInfo) _GUICtrlListView_SetItem($idLV, $sStatus, $iValue, 1) Next EndFunc ;==>VerifyDownLoad ps. see how you can make a runable script without having the full blown code...
    1 point
  8. lemony It`s no heavy #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> $hGUI = GUICreate("Test GUI", 300, 200) $hListView = GUICtrlCreateListView("Items|SubItems", 10, 10, 280, 180, $LVS_REPORT, $WS_EX_CLIENTEDGE) For $i = 1 To 10 _GUICtrlListView_AddItem($hListView, "Item " & $i) _GUICtrlListView_AddSubItem($hListView, $i - 1, "SubItem " & $i, 1) Next GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam) Local $tNMHDR, $IdFrom, $iCode $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $IdFrom = DllStructGetData($tNMHDR, "IdFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $IdFrom Case $hListView Switch $iCode Case $LVN_ITEMCHANGING Return 1 EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY
    1 point
×
×
  • Create New...