Jump to content

/dev/null

MVPs
  • Posts

    2,874
  • Joined

  • Last visited

Everything posted by /dev/null

  1. you are right! I modified the script for my quick test :-) Br Kurt
  2. works for me. Maybe there are multiple instances of the script running (as you don't have a kill switch). Did you kill the running instance via task manager after every test? BTW: You can "debug" it with MsgBox like so. #include <Constants.au3> MsgBox($MB_SYSTEMMODAL, "Bridge Tool", "Start") HotKeySet("+m", "Bridge") $bridge = False Func Bridge()     $bridge = Not $bridge     If $bridge = True Then         Send("{CTRLDOWN}")         Send("{s down}") MsgBox($MB_SYSTEMMODAL, "Bridge Tool", "bridge = True")     Else         Send("{s up}")         Send("{CTRLUP}") MsgBox($MB_SYSTEMMODAL, "Bridge Tool", "bridge = False")     EndIf EndFunc While 1     If $bridge = True Then         Sleep(2000)         MouseClick("right")   MsgBox($MB_SYSTEMMODAL, "Bridge Tool", "in while loop ...")     EndIf WEnd Br Kurt
  3. In any case, AutoIT will not help you in this endeavor. >He would charge about 75 dollars.... for flashing a router? Aren't there any instructions on the internet that you can use to do it yourself? Br Kurt
  4. Yeah, had a "brief" break Br Kurt
  5. see my explanation here https://www.autoitscript.com/forum/topic/208800-htaccess-issue-with-autoit-code-help/?tab=comments#comment-1507291 Br Kurt
  6. >is causing this to fail with a 404 error. this indicates that the rewrite to /void.php was executed because the User-Agent or Accept-Language headers were not set properly. Try to set these headers as follows. $oHTTP.Open("GET", $Crawler_URL, False) $oHTTP.setRequestHeader('User-Agent', 'Mozilla/5.0 AU3 Script') $oHTTP.setRequestHeader('Accept-Language', 'en-US') $oHTTP.Send() Br Kurt
  7. >I need to find network location of my running script please define "network location". Are you looking for the IP subnet-id and the netmask? If so, you'll get that with ipconfig or netsh interface. So either run these commands and parse their output or use some code from the following post. Br Kurt
  8. I don't know why the DEP flag is not set by Aut2Exe for 32 bit executables, but a quick-n-dirty workaround would be to create a 64-bit executeable, because the DEP flag is enabled by default for these (Windows does that). Another option, if you need 32-bit: Download Visual Studio (Community Edition) and use editbin.exe to set the DEP flag for your 32-bit executable. Beware, that this is a crazy 10 Gbyte download (you'll need the C++ build tools), just for that single file editbin.exe Path for both files: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\Hostx64\x86> check DEP dumpbin /headers | find "NX compatible" check ASLR  dumpbin /headers | find "Dynamic base" set DEP editbin /NXCOMPAT file.exe set ASLR editbin /DYNAMICBASE file.exe Br Kurt
  9. my understanding is that all elements have been fully loaded. HTML, CSS, images, whatever is referenced in the HTML file. See: C:\Program Files (x86)\AutoIt3\Include\IE.au3 search for Func _IELoadWait. That function uses the DOM property ReadyState. Read also these for more explanations. https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa752066(v=vs.85) https://developer.mozilla.org/en-US/docs/Web/API/Document/readyState?retiredLocale=de Br Kurt
  10. >Can AutoIT capture all this and convert it to an exe file? Your description implies many steps and probably some files that need to be transferred and executed. There is really no (easy) way to combine all this into one exe file with AutoIT. Any specific reason why you want the whole "session" to be packed into an exe? Moreover: beware of "someone" who is willing to flash anyone of your devices Br Kurt
  11. O.K. let's talk about the generous budget. In what range is it? Kurt
  12. O.K, now I'm really curious! How does this make LIFE easier for yourself and your wife??? Kurt
  13. take a look at _Singleton() in Misc.au3 (AutoIT include dir)... It uses CreateMutex() and contains everything you might need. Kurt
  14. AutoHotkey is NOT HotkeyNet! You really have to ask in the HotkeyNet forum: http://www.hotkeynet.com/ Kurt
  15. you could ask in the hotkeynet forum how KillMutex is implemented and the use DllCall() to do the same, if possible. Kurt
  16. did you look at the samples for _FileChangeRecursive()???
  17. Hi, you could use _FileChangeRecursive() http://www.autoitscript.com/forum/index.ph...c=40542&hl= with these worker functions (with/without overwrite). NOT TESTED, but should work! #include "_FileChangeRecursive.au3" $retval = _FileChangeRecursive("C:\temp","*.au3",-1,"_BackupFile_Overwrite","C:\temp","c:\backup") $retval = _FileChangeRecursive("C:\temp","*.au3",-1,"_BackupFile_NO_Overwrite","C:\temp","c:\backup_no_overwrite") func _BackupFile_Overwrite($filepath,$basepath,$backupfolder) Local $relpath = StringReplace($filepath,$basepath,"") FileCopy($filepath,$backupfolder & $relpath,8) endfunc func _BackupFile_NO_Overwrite($filepath,$basepath,$backupfolder) Local $relpath = StringReplace($filepath,$basepath,"") FileCopy($filepath,$backupfolder & $relpath,8+1) endfunc Kurt
  18. use ODBC to connect to the database. Search the forum for "+ObjCreate +ADODB +DRIVER" for samples how to do that. Kurt
  19. Your string will be: e:\player\vlc.exe--no-plugins-cache--config=e:\player\vlcrce:\VIDEO_TS Do you see somthing? No blanks !! Kurt
  20. if you tell us more about the purpose of the script, we can possibly show you better ways than using a large text file. However, from your description above I cannot say anything. Kurt
  21. in the early days of AutoIT 3, when the source code was still public (~ 2005), I implemented some macros for that purpose (@ScriptLineNumberBefore, etc.), but Jon opted against it, due to the runtime overhead of those macros. Since then I do this: I write debug code all over the script, which will not be executed during normal script operation. The debug flag and a debug level will be triggered by a command line switch, which means the user, who finds a problem, will have to re-run the script with debug option. In debug mode I do log every func entry and exit, I do log variable names and content and the like. With this strategy, I was able to find every bug so far. However, I was "lucky" and there were not really much bugs yet ;-)) If the debug switch is not an option for your users, there is little you can do to trap those cases you describe, EXCEPT to make your program more fool proof by adding as much error checks as possible and to avoid situations where AutoIT could fail internally (e.g. EVAL), which never happened in any one of my scripts so far, and I do use AutoIT for scripts with ~ 10.000 lines of code (not just dumb if clauses, but well structured code ;-)). There is however something you could do to automate the debug process. Valik mentioned this already. I suggest a slight modification. Run one master script, which uses RunWait() to run the "worker" script. The master script will check the return status of the worker and if it detects any abnormal exit, it will restart the worker with the same options AND the debug flag. That could be a way to automate the process. Obviously this will not work in all cases, as the environment might have changed during the second run, but it is better than nothing :-)) I could imagine some kind of ring-buffer for log events, built into AutoIT, which will be written to disk when a script "crashes". However this will only work for those cases where AutoIT detects a problem and terminates the script and not real crashes. EDIT: BTW. If speed is your biggest concern against debug code, AutoIT might be the wrong language/environment for your task. Cheers Kurt
  22. Open a bug report here: http://www.autoitscript.com/trac/autoit (New Ticket) Be as specific as possible. Kurt
  23. _FileChangeRecursive() with the worker function _BackupFile() or _CopyFile(), see _FileChangeRecursive_Samples.au3. http://www.autoitscript.com/forum/index.ph...c=40542&hl= BTW: the "path ignore" feature can be to implemented in the worker function. Cheers Kurt
  24. I was talking about the CONTENT of the connection file (*.rdp). Kurt
  25. _FileChangeRecursive() with the worker function below: Link: http://www.autoitscript.com/forum/index.ph...c=40542&hl= Calling syntax and Worker: #include "_FileChangeRecursive.au3" #include <file.au3> $retval = _FileChangeRecursive("D:\","*.pdf",-1,"_FileNameLen",8) func _FileNameLen($filepath,$len) Local $szDrive, $szDir, $szFName, $szExt $TestPath = _PathSplit($filepath, $szDrive, $szDir, $szFName, $szExt) If StringLen($szFName) > $len Then ConsoleWrite("Name longer than " & $len & ": " & $filepath & @CRLF) Endif endfunc Kurt
×
×
  • Create New...