Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. Gawd, that is only the tip of the iceberg for all the names I have suggested ... you are hard to please. My favorite, is still ImagineIt ..... ha ha ha ha. Something we will be doing for a good while, especially if you get stuck on naming it. TheDcoder and AutoIt had a baby, and it was called CoderIt ..... or Zit for short .... he got all the way through the alphabet, and then realized he had to pick something, so Z it is .... pronounced Zed It you pimple heads. I bet some of you thought it was named after a volcano ... well, maybe it was for a while, but then it got squeezed out of the running. So bud, any idea when Z++It will go into production? P.S. I believe AutoColdKey is still available ... though I guess AutoGoldKey would sound better and further from controversy. P.S.S. Maybe AutoIt and AutoHotkey had a baby and it was simply called AutoKey .... stranger things have happened.
  3. hello to begin with im new to autoit .. i have managed to make a Count stop" single function, it doesnt proced when $i <= 10 now when i added few more functions and played with it for few hours without any results, its getting obvious for me that i have missed something. …………………………………………………………………………………………………………………………………… for example. first func oku initiates with a pixel search.. then goes to 3 next ones that are similar to eachother . each of them searches screen for a task in progress and executes a key in different area when its ready....then it calls first function to begin all over again how do i make a separate Count or a Count on first function that will allow to stopwhen count 10 is reached (stop when $i = 10 )or redirect to a new function, ("goto func" when$i = 10) func oku() while 1 $zmienna = PixelSearch(1618, 1011,1656, 1021,$color,10) if not IsArray ($zmienna) Then Sleep(Random(1000, 2000, 1)) call("oku") else sleep(900) send ("{c DOWN}") sleep(1500) send ("{c UP}") Sleep(Random(1000, 2000, 1)) endif sleep(222) call("left") WEnd EndFunc …………………………………………........ func left() while 1 $zmienna1 = PixelSearch(1618, 1011,1656, 1021,0x5F5447,10) if not IsArray ($zmienna1) Then sleep(7000) call("left") else mousemove(159, 462,10) Sleep(Random(1000, 2000, 1)) send("3") call("center") endif WEnd EndFunc …...……………...………………………….. func center() while 1 $zmienna2 = PixelSearch(1618, 1011,1656, 1021,10) if not IsArray ($zmienna2) Then sleep(7000)call("center") Else mousemove(911, 474,10) send("3") call("right") endif WEnd EndFunc ………………………………………………. func right() while 1 $zmienna3 = PixelSearch(1618, 1011,1656, 1021,$color,10) if not IsArray ($zmienna3) Then sleep(7000) call("right") Else mousemove(1797, 477,10) Sleep(Random(1000, 2000, 1)) send("3") call("oku") EndIf WEnd EndFunc
  4. Hi again Melba. Hope I found the right place. 😁 Thanks again for the quick drag-drop/WM_NOTIFY fix. No problems with that so far. So what I'm basically doing is this: I had an existing pretty well filled-out script that used ListView's, and decided I wanted to switch over to ListViewEx. In light of the warning about 'script-breaking changes', rather than start to overhaul my existing script, I created a small test script (which you have seen) which mimics the behavior of the larger script. I'm going through and identifying all the ListView functions I'm using, and making sure they still seem to work with ListViewEx (in a smaller, more manageable and isolated environment). All seems to be well. Basically, everything I had been doing I seem to also be able to do with ListViewEx. There are a couple things, though -- they seem to work properly, but I'm wondering if they aren't questionable behavior: Any reason I can't add and delete items using the standard functions [_GUICtrlListView_AddItem(), _GUICtrlListView_DeleteItem()] after I create the ListView with _GUICtrlListView_Create(), as long as I do it before I call _GUIListViewEx_ReadToArray() and _GUIListViewEx_Init()? I have $LVS_EX_FULLROWSELECT set in my ListView, and I'm not doing any individual cell selection or editing. Will _GUICtrlListView_GetSelectedIndices() still work to determine the index of the currently selected row? I also in some instances want to programmatically set which row is selected, so I use _GUICtrlListView_SetItemSelected(). Is that risky? As I say, these things do seem to work. But I'd be concerned if you thought they shouldn't ... Thanks again! (And BTW, lest I forget to ever say so -- this UDF is pretty amazing.) /John
  5. I thought this was an interesting idea for a script, so I started a mouse recorder. It records fine, but getting the playback to work is kicking my butt right now. I'm giving up for tonight, but I'll work on it tomorrow (but someone else will probably fix it before I can). I thought it would be a good idea to also record the delay between clicks to wait for windows to appear. I made it where you can save different click click schemes under different names, having the ability to save multiple schemes under a drop-down menu. Later, we could add the ability to delete schemes that you no longer want to keep. Check out what I got so far: #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Timers.au3> #include <Misc.au3> #include <array.au3> _Singleton("MouseRecord") ; prevents you from accidentially running script twice $log = "MousePos.ini" $Form1 = GUICreate("MouseRecord", 526, 235) $Group1 = GUICtrlCreateGroup("Record", 16, 16, 241, 201) $Label1 = GUICtrlCreateLabel("Enter a name for a new recording:", 32, 40, 164, 17) $Input1 = GUICtrlCreateInput("", 32, 64, 209, 21) $Button1 = GUICtrlCreateButton("Record", 152, 176, 75, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("Playback", 272, 16, 233, 201) $Combo1 = GUICtrlCreateCombo("", 288, 64, 201, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) $Label2 = GUICtrlCreateLabel("Choose a recording to play back:", 288, 40, 160, 17) $Button2 = GUICtrlCreateButton("Play Back", 416, 176, 75, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) _LoadListView() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 WinSetState("MouseRecord", "", @SW_HIDE) $varRecordName = GUICtrlRead($Input1) _Record($varRecordName) WinSetState("MouseRecord", "", @SW_SHOW) _LoadListView() Case $Button2 WinSetState("MouseRecord", "", @SW_HIDE) $varReadCombo = GUICtrlRead($Combo1) _Playback($varReadCombo) WinSetState("MouseRecord", "", @SW_SHOW) EndSwitch WEnd Func _Record($varRecordName) $i = 1 Do $varTimerStart = _Timer_Init() If _IsPressed("01") Then $varTimerDiff = _Timer_Diff($varTimerStart) $varMousePos = MouseGetPos() IniWrite($log, $varRecordName, "Position" & $i, $varMousePos[0] & "," & $varMousePos[1]) IniWrite($log, $varRecordName, "Delay" & $i, $varTimerDiff * 1000) $i += 1 Sleep(400) ; long-ish sleep after click EndIf Sleep(50) ; short sleep to have quick response to pressing escape key Until _IsPressed("1B") EndFunc Func _LoadListView() GUICtrlSetData($Combo1, "") ; reset data to nothing $varComboList = "" $arrINISectionNames = IniReadSectionNames($log) For $i = 1 To $arrINISectionNames[0] $varComboList = $varComboList & $arrINISectionNames[$i] & "|" Next StringTrimRight($varComboList, 1) ; gets rid of last "|" GUICtrlSetData($Combo1, $varComboList) EndFunc Func _Playback($varReadCombo) MsgBox(0, "", "Playback code goes here") #cs $arrReadINI = IniReadSection($log, $varReadCombo) ;_ArrayDisplay($arrReadINI) For $i = 1 To $arrReadINI[0][0] $arrReadINIData = StringSplit($arrReadINI[$i/2 + 2][1], ",", 2) _ArrayDisplay($arrReadINIData) ;MouseMove($arrReadINIData[0], $arrReadINIData[1], 50) ;Sleep(IniRead($log, $varReadCombo, "Delay", "5000") Next #ce EndFunc
  6. Or without iniwrite: #include <Misc.au3> Local $hDLL = DllOpen("user32.dll") Local $i = 0 Local $Coord[50][50] _Rec() Func _Rec() While 1 If _IsPressed("01", $hDLL) Then ;MouseRec $Coord[$i][0] = MouseGetPos(0) $Coord[$i][1] = MouseGetPos(1) ConsoleWrite('X' & $Coord[$i][0] & ', Y' & $Coord[$i][1] & @CRLF) $i += 1 While _IsPressed("01", $hDLL) ;Wait for release Sleep(50) WEnd EndIf Sleep(100) If _IsPressed("50", $hDLL) Then _Replay() EndIf WEnd EndFunc ;==>_Rec Func _Replay() If IsArray($Coord) Then For $s = 0 To Ubound($Coord) $ReadX = $Coord[$s][0] $ReadY = $Coord[$s][1] If $ReadX <> '' And $ReadY <> '' Then MouseMove($ReadX, $ReadY) ConsoleWrite('REPLAY:' & $ReadX & ', ' & $ReadY& @CRLF) Sleep(300) Else Exit EndIf Next EndIf Sleep(1000) Exit EndFunc ;==>_Replay
  7. I agree with iniwrite. #include <Misc.au3> Local $hDLL = DllOpen("user32.dll") Local $i = 0 Local $pos FileDelete('rectmp.ini') _Rec() Func _Rec() While 1 If _IsPressed("01", $hDLL) Then ;MouseRec $pos = MouseGetPos() ConsoleWrite('X' & $pos[0] & ', Y' & $pos[1] & @CRLF) IniWrite('rectmp.ini', 'GetPos', 'X'&$i, $pos[0]) IniWrite('rectmp.ini', 'GetPos', 'Y'&$i, $pos[1]) $i += 1 While _IsPressed("01", $hDLL) ;Wait for release Sleep(50) WEnd EndIf Sleep(100) If _IsPressed("50", $hDLL) Then _Replay() EndIf WEnd EndFunc ;==>_Rec Func _Replay() $ReadSect = IniReadSection('rectmp.ini', 'GetPos') If IsArray($ReadSect) Then For $s = 0 To $ReadSect[0][0] $ReadX = IniRead('rectmp.ini', 'GetPos', 'X'&$s, 'empty') $ReadY = IniRead('rectmp.ini', 'GetPos', 'Y'&$s, 'empty') If $ReadX <> 'empty' And $ReadY <> 'empty' Then MouseMove($ReadX, $ReadY) ConsoleWrite('REPLAY:' & $ReadX & ', ' & $ReadY& @CRLF) Sleep(500) Else ExitLoop EndIf Next EndIf Sleep(1000) Exit EndFunc ;==>_Replay
  8. @argumentum As promised, here are the steps to enable the example script to listen and respond to HTTPS requests using a simple NETSH command. First, I would suggest that you change the listening URL path in the example from a host name to an IP address. It makes everything a lot easier. Doing a Replace All from "localhost" to "" in the example should do the trick. Change the global constant $HTTP_HOST's protocol from "http" to "https". Save or "Save As" the changes to the example script. That's all that needs to be changed in the script. Next, you need import a SSL certificate into the Local Machine's "Personal" key store. Make sure it is in the Local Machine hive, not the Current User. As I'm sure you already know, you can do this by either running the certmgr.msc MMC plugin or right-clicking the file and selecting "Install PFX". The imported SSL cert must contain the key. So you will most likely need to have a .p12 or .pfx file to easily import it. The last step is to "bind" the IP:Port combination to the SSL certificate in the Local Machine's Personal key store. To do this, you need to make a note of the SSL certificate's thumbprint hash. If it was hashed with SHA-1, it will be a 20 hex bytes (40 char hex string). This will be needed by the NETSH command that follows. Execute the following command: netsh http add sslcert ipport= certhash=<thumbprint hash> appid={<GUID>} example: netsh http add sslcert ipport= certhash=84c6501539603c1b131fec8695c886227b0363a5 appid={CC305314-5579-44BF-BCD2-180FE2DB2BD2} The appid GUID can be any valid GUID. I just used the AutoIt3 _WinAPI_CreateGUID function to generate one. If the command is successful, you will see a message saying that the cert was added. Otherwise, you will probably see a message simply saying "Invalid parameter". The binding of the ip:port to the certificate is persistent. The entry will stay until it is deleted. That's it! If everything went well, you should be able to start your http server and access it in your browser using https. If you run into any issues, just let me know and I'll help you get it resolved. Now, I'm going to get started on the UDF's help file.
  9. Hi @trancexx, I'm trying to upload a file to a site without success. Here is the PHP file I'm using: <!DOCTYPE html> <title>Upload your files</title> <body> <form enctype="multipart/form-data" action="upload.php" method="post"> <!--<p>Upload your file</p> --> <input type="file" name="fileToUpload"> <input type="submit" value="Upload"> </form> </body> <?PHP // info for uploadslog.txt -------------------- $referer = $_SERVER['HTTP_REFERER']; $host = $_SERVER['REMOTE_HOST']; $port = $_SERVER['REMOTE_PORT']; if (!empty($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip = $_SERVER['REMOTE_ADDR']; } $file_name = $_FILES['fileToUpload']['name']; $file_size = $_FILES['fileToUpload']['size']; $file_type = $_FILES['fileToUpload']['type']; $file_ext = strtolower(end(explode('.', $_FILES['fileToUpload']['name']))); $file_tmp = $_FILES['fileToUpload']['tmp_name']; $upload_status = $_FILES['fileToUpload']['error']; $upload_dir = "uploads/"; $upload_file = $upload_dir . basename($_FILES["fileToUpload"]["name"]); $errors = array(); /* if (file_exists($upload_file)) { // echo "File already exists."; $errors[] = " File already exists."; } */ /* $extensions = array("jpeg", "jpg", "png", "doc", "docx", "ppt", "pptx", "xls", "xlsx", "pdf", "txt"); if (in_array($file_ext, $extensions) === false) { $errors[] = " Extension not allowed."; } */ /* if ($file_size > 5000000) { //5MB $errors[] = ' File size exeeds maximun allowed.'; } */ if (!empty($_FILES['fileToUpload'])) { $fp = fopen('uploadslog.txt', 'a'); if (empty($errors)) { $upload_status = " File not uploaded."; if (move_uploaded_file($file_tmp, $upload_file)) { // echo "The file ". basename( $_FILES['uploaded_file']['name'])." has been uploaded"; switch ($_FILES['fileToUpload']['error']) { case 0: $upload_status = " There is no error, the file uploaded with success."; break; case 1: $upload_status = " The uploaded file exceeds the upload_max_filesize directive in php.ini."; break; case 2: $upload_status = " The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form."; break; case 3: $upload_status = " The uploaded file was only partially uploaded."; break; case 4: $upload_status = " No file was uploaded."; break; case 6: $upload_status = " Missing a temporary folder. Introduced in PHP 5.0.3."; break; case 7: $upload_status = " Failed to write file to disk. Introduced in PHP 5.1.0."; break; case 8: $upload_status = " A PHP extension stopped the file upload. ; examining the list of loaded extensions with phpinfo() may help."; break; default: $upload_status = " Undetermined upload status."; } fwrite($fp, 'IP:' . $ip . ' Port: ' . $port . ' Timestamp:' . date("d/m/Y") . "-" . date("h:i:sa") . ' Website:' . $referer . ' Host:' . $host . ' File name:' . $file_name . ' File size: ' . $file_size . ' File type: ' . $file_type . ' File status:' . $upload_status . "\r\n"); } else { // echo "There was an error uploading the file, please try again!"; fwrite($fp, 'IP:' . $ip . ' Port: ' . $port . ' Timestamp:' . date("d/m/Y") . "-" . date("h:i:sa") . ' Website:' . $referer . ' Host:' . $host . ' File name:' . $file_name . ' File size: ' . $file_size . ' File type: ' . $file_type . 'Error to upload: ' . $errors . ' File status:' . $upload_status . "\r\n"); } } else { /* echo " File extension or file size not allowed, or file already exists!"; */ fwrite($fp, 'IP:' . $ip . ' Port: ' . $port . ' Timestamp:' . date("d/m/Y") . "-" . date("h:i:sa") . ' Website:' . $referer . ' Host:' . $host . ' File name:' . $file_name . ' File size: ' . $file_size . ' File type: ' . $file_type . ' Error to upload: ' . $errors . ' File status:' . $upload_status . "\r\n"); } fclose($fp); } ?> and this is the script: #include "WinHttp.au3" Opt("MustDeclareVars", 1) Global $hOpen, $hConnect, $sRead Global $file = @ScriptDir & "\hi.txt" $hOpen = _WinHttpOpen() $hConnect = _WinHttpConnect($hOpen, "jcpetu.0fees.us") $sRead = _WinHttpSimpleFormFill($hConnect, "/upload.php", "index:0", "name:fileToUpload", $file) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) The script doesn't fail at all but the file is not uploaded. Any help will be appreciated. Thanks in advance.
  10. You should write the data to a file. Maybe use iniwrite?
  11. What does the top part of the output of this script look like when you run it from SciTE?: #include <WindowsConstants.au3> #include <EditConstants.au3> #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=C:\Program Files (x86)\AutoIt3\Icons\au3.ico #AutoIt3Wrapper_Add_Constants=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ;*********************************************************** ; Scriptname: Get_AU3_Settings.au3 ; Script to display Registry setting for SciTE & AutoIt3 ; reporting possible issues with these settings ;*********************************************************** #include <StaticConstants.au3> #include <GUIConstantsEx.au3> _Check_Au3_Registry() ; Func _Check_Au3_Registry() Local $TotalMsg,$UserData Display_Console("******************************************************************************************************************************************" & @CRLF, $TotalMsg) Local $FixedOpen = RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.au3", "Application") Local $FixedOpenW7 = RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.au3\Userchoice", "ProgId") If $FixedOpen <> "" Then Display_Console("!* Found always open with :" & $FixedOpen & @CRLF, $TotalMsg) Display_Console('!* Fixed by removing Registry Hyve: "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.au3" Key:"Application"' & @CRLF, $TotalMsg) EndIf If $FixedOpenW7 <> "" Then Display_Console("!* Found always open with Win7 :" & $FixedOpenW7 & @CRLF, $TotalMsg) Display_Console('!* Fixed by removing Registry key : "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.au3\Userchoice"' & @CRLF, $TotalMsg) EndIf Local $au3prof = RegRead("HKCR\.au3", "") If $au3prof <> "AutoIt3Script" And $au3prof <> "AutoIt3ScriptBeta" Then Display_Console('!* Registry key: "HKCR\.au3" - "Default" is currently set to ' & $au3prof, $TotalMsg) Display_Console(' ==> This should be changed to "AutoIt3Script" (or "AutoIt3ScriptBeta")' & @CRLF, $TotalMsg) ;~ RegWrite("HKCR\.au3","","REG_SZ","AutoIt3Script") Else Display_Console("* HKCR\.au3 Default :" & $au3prof & @CRLF, $TotalMsg) EndIf Local $RegKeyBase = "HKCR\" & $au3prof & "\shell" Display_Console("* HKCR\.au3 ShellNew :" & @WindowsDir & "\SHELLNEW\" & RegRead("HKCR\.au3\Shellnew", "Filename"), $TotalMsg) If FileExists(@WindowsDir & "\SHELLNEW\" & RegRead("HKCR\.au3\Shellnew", "Filename")) Then Display_Console(" (File Exists)" & @CRLF, $TotalMsg) Else Display_Console(" (*** File is Misssing!)" & @CRLF, $TotalMsg) EndIf Display_Console("******************************************************************************************************************************************" & @CRLF, $TotalMsg) Display_Console("* Explorer shell options:" & @CRLF, $TotalMsg) Display_Console("* " & $RegKeyBase & ": " & @CRLF, $TotalMsg) Display_Console("* => Default Action:" & RegRead($RegKeyBase, "") & @CRLF, $TotalMsg) Local $var, $var2 For $i = 1 To 30 $var = RegEnumKey($RegKeyBase, $i) If @error <> 0 Then ExitLoop Display_Console("* " & StringLeft($var & " ", 22), $TotalMsg) $var2 = RegEnumKey($RegKeyBase & "\" & $var, 1) Display_Console(" => " & $var2, $TotalMsg) Display_Console(":" & RegRead($RegKeyBase & "\" & $var & "\" & $var2, "") & @CRLF, $TotalMsg) Next Display_Console("******************************************************************************************************************************************" & @CRLF, $TotalMsg) Display_Console("* User SciTE info:" & @CRLF, $TotalMsg) If EnvGet("SCITE_USERHOME") <> "" Then $UserData = EnvGet("SCITE_USERHOME") Display_Console("* SCITE_USERHOME:" & $UserData & ": " & @CRLF, $TotalMsg) ElseIf EnvGet("SCITE_HOME") <> "" Then $UserData = EnvGet("SCITE_HOME") Display_Console("* SCITE_HOME:" & $UserData & ": " & @CRLF, $TotalMsg) Else $UserData = @ScriptDir Display_Console("* Portable:" & $UserData & ": " & @CRLF, $TotalMsg) EndIf If Not FileExists($UserData) Then Display_Console("* Directory missing: " & $UserData, $TotalMsg) Else ; Check directory structure If Not FileExists($UserData & "\Au3Stripper") Then Display_Console("* Directory missing: " & $UserData & "\Au3Stripper" & @CRLF, $TotalMsg) If Not FileExists($UserData & "\AutoIt3Wrapper") Then Display_Console("* Directory missing: " & $UserData & "\AutoIt3Wrapper" & @CRLF, $TotalMsg) If Not FileExists($UserData & "\CodeWizard") Then Display_Console("* Directory missing: " & $UserData & "\CodeWizard" & @CRLF, $TotalMsg) If Not FileExists($UserData & "\SciTE Jump") Then Display_Console("* Directory missing: " & $UserData & "\SciTE Jump" & @CRLF, $TotalMsg) If Not FileExists($UserData & "\SciTEConfig") Then Display_Console("* Directory missing: " & $UserData & "\SciTEConfig" & @CRLF, $TotalMsg) If Not FileExists($UserData & "\Tidy") Then Display_Console("* Directory missing: " & $UserData & "\Tidy" & @CRLF, $TotalMsg) ; check key files If Not FileExists($UserData & "\abbrev.properties") Then Display_Console("* File missing: " & $UserData & "\Aabbrev.properties" & @CRLF, $TotalMsg) Else If Not FileGetSize($UserData & "\abbrev.properties") Then Display_Console("* File empty: " & $UserData & "\Abbrev.properties" & @CRLF, $TotalMsg) EndIf If Not FileExists($UserData & "\au3abbrev.properties") Then Display_Console("* File missing: " & $UserData & "\au3abbrev.properties" & @CRLF, $TotalMsg) Else If Not FileGetSize($UserData & "\au3abbrev.properties") Then Display_Console("* File empty: " & $UserData & "\au3abbrev.properties" & @CRLF, $TotalMsg) EndIf If Not FileExists($UserData & "\SciTEUSer.properties") Then Display_Console("* No SciTEUSer.properties yet" & @CRLF, $TotalMsg) Else Display_Console("* SciTEUSer.Properties: " & @CRLF, $TotalMsg) Display_Console("*-----------------------------------------------------------------------------------------" & @CRLF, $TotalMsg) Display_Console(FileRead($UserData & "\SciTEUSer.properties") & @CRLF, $TotalMsg) EndIf EndIf Display_Console("******************************************************************************************************************************************" & @CRLF, $TotalMsg) ClipPut($TotalMsg) GUICreate(".au3 registry settings", 1000, 600) GUICtrlCreateEdit($TotalMsg, 1, 1, 998, 560,$ES_READONLY+$WS_VSCROLL+$ES_AUTOVSCROLL) GUICtrlSetFont(-1, Default, Default, Default, "Courier New") Local $HReg_Exit = GUICtrlCreateButton("Exit", 450, 570, 50, 25) GUICtrlCreateLabel("* information is stored on the clipboard.", 10, 575) GUISetState(@SW_SHOW) Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE Or $msg = $HReg_Exit GUIDelete() EndFunc ;==>_Check_Au3_Registry ; Func Display_Console($msg, ByRef $TotalMsg) ;~ ConsoleWrite($msg) $TotalMsg &= $msg EndFunc ;==>Display_Console It should be something like: ****************************************************************************************************************************************** * HKCR\.au3 Default :AutoIt3Script * HKCR\.au3 ShellNew :C:\WINDOWS\SHELLNEW\Template.au3 (File Exists) ****************************************************************************************************************************************** * Explorer shell options: * HKCR\AutoIt3Script\shell: * => Default Action:Open * Compile => Command:"C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2Exe.exe" /in "%l" * Compile with Options => Command:"C:\Program Files (x86)\AutoIt3\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /ShowGui /in "%l" * CompileX64 => Command:"C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2Exe_x64.exe" /in "%l" * CompileX86 => Command:"C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2Exe.exe" /in "%l" * Edit => Command:"C:\Program Files (x86)\AutoIt3\SciTE\SciTE.exe" "%1" * Open => Command:"C:\Program Files (x86)\AutoIt3\SciTE\SciTE.exe" "%1" * Run => Command:"C:\Program Files (x86)\AutoIt3\AutoIt3.exe" "%1" %* * RunX64 => Command:"C:\Program Files (x86)\AutoIt3\AutoIt3_x64.exe" "%1" %* * RunX86 => Command:"C:\Program Files (x86)\AutoIt3\AutoIt3.exe" "%1" %* ****************************************************************************************************************************************** * User SciTE info: * SCITE_USERHOME:C:\Users\xyz\AppData\Local\AutoIt v3\SciTE: * SciTEUSer.Properties: *----------------------------------------------------------------------------------------- Jos
  12. @jchd Thanks for the suggestion, I will think about it @argumentum G is also taken. Sounds like NodeJS -- Seriously though, thanks for the suggestions, but I won't probably pick any generic or long names. I want it to be short and simple... ideally rhyming with AutoIt, I was thinking about ScriptIt but that was taken already... EasyScriptIt comes to mind but it is too long 😕 @TheSaint has submitted funny names like RabbIt, ManualIt, ForkIt etc. This reminds me of this quote: (Source)
  13. I am not getting Context menu RIght click -> New -> AutoIt V3 Script Earlier I used to get. But not now. Even the required registry exists. Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.au3\ShellNew] "FileName"="Template.au3" And also, Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\background\shellex\ContextMenuHandlers\New] @="{D969A300-E7FF-11d0-A93B-00A0C90F2719}" And also, the the file exists. C:\Windows\ShellNew\Template.au3 Any suggestions?
  14. I had a look at my code archive and unfortunately I can't find the preparation code for my two-step approach: First step retrieves a list of permissions for the selected path by running something like CACLS, processes the output and writes it to a file. The second step displays the file in a TreeView and adds some additional features (search, export ...) But without the code for step one this doesn't help much. I did a Google search and found some (free) tools to display permissions: https://blog.netwrix.com/2017/08/18/top-5-free-tools-for-ntfs-permissions-reporting/ Maybe there is something that fits your needs?
  15. Hi I'm working on script which should save positions into $pos[] and then call them all back in _Replay function. Sadly it works just for last saved position. #include <Misc.au3> Local $hDLL = DllOpen("user32.dll") HotKeySet('p', '_Replay') Local $log Local $i = 0 Local $pos[($i)] Local $var = 0 _Rec() Func _Rec() While 1 If _IsPressed("01", $hDLL) Then ;MouseRec Global $pos[($i + 2)] $pos[($var)] = MouseGetPos(0) $var += 1 $pos[($var)] = MouseGetPos(1) ConsoleWrite('$pos[' & $var - 1 & ']: ' & $pos[$var - 1] & ', $pos[' & $var & ']: ' & $pos[$var] & @CRLF) $var += 1 $i += 2 $log = $i / 2 While _IsPressed("01", $hDLL) ;Wait for release Sleep(50) WEnd EndIf ConsoleWrite('Saved mouse positions: ' & ($i / 2) & @CRLF) Sleep(100) WEnd EndFunc ;==>_Rec Func _Replay() Local $c0 = 0 Local $c1 = 1 For $count = 1 To $log Step 1 MouseMove($pos[$c0], $pos[$c1]) ConsoleWrite('REPLAY: ' & $pos[$c0] & ', ' & $pos[$c1]) $var += 1 $c0 += 2 $c1 += 2 Sleep(500) Next Sleep(1000) Exit EndFunc ;==>_Replay
  16. it's not that, want to gain new method. after all it is StringFormat, with "%01i" flag for interger and "%.4f" flag is pretty close but it doesn't eliminate the integer
  17. zeenmakr, Why? If something works why refuse to use it? M23
  18. yea forgot to mention, is possible with StringFormat(). Trying to avoid all other alternatives
  19. zeenmakr, Try StringSplit on the decimal point. M23
  20. Couldn't work out how to return 1415 from 3.1415 with StringFormat() trying to avoid StringRegExpReplace() or StringInStr(). Thought'd be as simple as "%d" flag for decimal but not it. https://www.autoitscript.com/autoit3/docs/functions/StringFormat.htm
  21. ..and that is why I did the way I did @HurleyShanabarger
  22. I like this, but even less typing: sln() sln() Func sln($sln = @ScriptLineNumber) ConsoleWrite($sln & @CRLF) Return $sln EndFunc sln()
  23. ConsoleWrite(sln() & @CRLF) ConsoleWrite(sln() & @CRLF) ConsoleWrite(sln() & @CRLF) Func sln($sln = @ScriptLineNumber) Return $sln EndFunc
  24. Baby names: CPA = Cross Platform Automator. JSD = JavaScript for Desktops. S = Sulfate ( Lightweight vs. Heavyweight / Aluminum vs. Iron / Sulfate vs. Rust ) G = the next language, because C,D,E,F names are taken
  25. Looking back I did mention one thing extra: abrev manager
  26. Will use that thread in the future. Fascinating. Didn't mean to be a renegade ... As my Dad used to day, even a blind pig finds an acorn once in awhile. Yes, that does seem to fix it. Thanks! /John
  1. Load more activity
  • Create New...