Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Thanks mLipok! Tried the AU3Check parameters. For some reason -w 5 really didn't like _Width(). Claimed three of the four parameters weren't used so at the end of the procedure I did some bogus operations on them but Au3check didn't want to play ball. I think Au3check is confused since _Width() is called from a GUIRegisterMsg() call. In the end I fixed a stray $i in _7Z_COMPRESS() and took that -w 5 out.
  3. RunWait(@ComSpec & ' /c "c:\Program Files\putty\plink.exe" -ssh root@SERVERNAME -pw PASSWORD halt', @SystemDir) this would connect with putty to the server SERVERNAME as root, usind the password PASSWORD and send a "halt" command to the machine. Or you could simulate using the real putty.exe and simulate keystrokes: Func putty($server, $passwort, $command) Run("c:\Program Files\putty\putty.exe" & " " & $server) WinWaitActive($server) Sleep(200) Send("root") Send("{ENTER}") Sleep(300) Send($passwort) Send("{ENTER}") Sleep(800) Send($command) Sleep(200) Send("{ENTER}") EndFunc ;==>putty
  4. Today
  5. As I used to use: in AutoIt3Wrapper.ini so I have to do small review.... please check this attached file (personaly I used to use WinMerge to compare files) btw. for now code looks good, but I not used it yet (before I run it, must check it deeply twice) Zip27z_102.au3
  6. This important note/remark could be bold or even RED..... so I do this for you Thanks for script I will check it carefully. btw. to the forum
  7. Note: There's a button to keep the console @SW_SHOW but it isn't implemented yet. When you show the console it will start hidden on the next file / process for the moment.
  8. Good evening! I know this has been done to death in many programming languages and probably even in AutoIt. But couldn't help myself and as a learning challenge I wrote "yet another converter" LOL I need your help to test it and show me "the error of my ways" but in a nutshell here's what it can do already (taken from my source file) : Converts all zip files recursively into a 7Zip file, with max compression REQUIRES AUTOIT Version + Exact copy with attributes and folder structure + Extensive error checking, including files blocked by anti-virus (by file count) + Can stop process and restart later with the use of a log file + Can pause process (but in between compressing / extracting files) + Creates a .CSV file that can be used to check on compression ratios + Dynamic GUI that enables user to see console while 7zip is working + Gui can be stretched horizontally for long filenames + Up to 5 retries while transfering compressed files + Checks free space (at startup) to make sure you don't kill your OS LOL + Have converted 10,000+ files with no issues in file integrity. + Open to suggestions and program free to modify to your liking + Will eventually be fully modular and configurable (if there is interest for this) + Exit codes so you can have an idea where program went wrong (if it did) + Fully commented so users can tinker away. - Cannot save archive comments. - Not FULLY tested yet, do not use on .zip files that have no backups The program also has a very minimal GUI that can be stretched. Not a huge fan of million-button interfaces. I also assume some people running this program will have a 1024x768 monitor so the GUI is made accordingly. There is no way I am keeping this script for myself. If this is useful to anybody, feel free to use it and modify it. All I ask is you credit me (as I will credit those who contribute). Now here's the issues that are left to fix. Any help is greatly appreciated and I will add your name in the credits if you so wish. - For some reason while compression is under way, all my current explorer windows flicker; notably the cut-and-paste part. I can't seem to narrow it down. - Also context menu is closed in explorer every time program compresses / extracts a new file - I've added support for retries if, for some reason, AutoIt can't move the converted file. This happened once after 5000-6000 conversions. Now that I've programmed the retries, the process is somewhat slower. It shouldn't affect speed though. - After compressing 10,000+ files (Yes I have that many zip files! Think Mame) I've had a system meltdown. There's a leak somewhere. Am I supposed to close something and I'm not? I've added _IsPressed() lately so closing that .DLL is not the cause of this leak. - Subtracting one array from another was a tricky thing to program (happens when user stops and restarts process), if you can think of a faster way I'm all in. Obviously if you find bugs or have suggestions, I'm all ears. Changelog is included in the source file, including credits. PLEASE DON'T CONVERT ALL YOUR FILES YET. It's not fully tested (well I tested it but I need others to test too). Obiwanceleri Zip27z_102.au3
  9. Hi Team, Could you please help me with script to execute Putty using autoit script. Thanks
  10. @rundak It's a jQuery datepicker control. You can set it's value like this -- _WD_ExecuteScript($sSession, "$('#inputType3').datepicker('setDate', '01-06-2020');") Note that there's no need to enable the control or clear it
  11. Are there any options to create triggers that start at a certain time and repeat at a specified time interval like every 15 minutes
  12. @sarge What have you tried? AFAIK, the same functionality should even in headless mode. P.S. No idea what button to which you referred
  13. You could use ftp batch text file instead which would be more reliable method: Example (untested): #include <File.au3> Local $sFTPTemp = _TempFile(@TempDir) FileWrite($sFTPTemp, "Open" & @CRLF) FileWrite($sFTPTemp, "Command1" & @CRLF) FileWrite($sFTPTemp, "Command2" & @CRLF & "Quit" & @CRLF) ;~ Use @ComSpec & ' /c ...' to [C]lose the command prompt window ;~ Use @ComSpec & ' /k ...' to [K]eep the command prompt window open RunWait(@ComSpec & ' /k ftp -n -s:"' & $sFTPTemp & '"') FileDelete($sFTPTemp)
  14. 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
  15. Yesterday
  16. Maybe you should check with one of the mods, if this thread is not against the rules of the forum.
  17. Yes it just a example, it should spin the Wheel if he see a pixel. I try to figure out how Autoit works.
  18. Is this some kind of keyboard automation for a a Gl├╝cksrad/Wheel of fortune game?
  19. Okay so if iam do it something like this? It should end Function and iam dont get stack overflow right? Dont ask if that function make any sense iam just to try to figure out how i can call from one Function to another one without error^^ Thank you a lot for your help! HotKeySet("{NUMPAD7}", "gluecksrad1") HotKeySet("{DEL}", "stop") $job1=1 $job2=2 $job3=3 $dojob = gluecksrad1 () While 1 Switch $dojob Case $job1 = gluecksrad1 () Case $job2 = gluecksrad2 () Case $job3 = gluecksrad3 () EndSwitch WEnd Func stop() Exit EndFunc ;==>stop Func gluecksrad1() $gluecksrad1 = PixelGetColor(164, 55) ;~ $Random2 = Random(4000, 4100 , 1) If $gluecksrad1 = 0xE5E5E5 Then ToolTip("") Sleep(100) Send("{s down}") Sleep(10) Send("{s up}") Else ToolTip("Suche Taste für Glücksrad 1") Sleep(1) ToolTip("") Return $job2 EndIf EndFunc ;==>gluecksrad Func gluecksrad2() $gluecksrad2 = PixelGetColor(164, 55) ;~ $Random2 = Random(4000, 4100 , 1) If $gluecksrad2 = 0xE5E5E5 Then ToolTip("") Sleep(100) Send("{s down}") Sleep(10) Send("{s up}") Exit Else ToolTip("Suche Taste für Glücksrad 2") Sleep(1) ToolTip("") Return $job3 EndIf EndFunc ;==>gluecksrad Func gluecksrad3() $gluecksrad3 = PixelGetColor(164, 55) ;~ $Random2 = Random(4000, 4100 , 1) If $gluecksrad3 = 0xE5E5E5 Then ToolTip("") Sleep(100) Send("{s down}") Sleep(10) Send("{s up}") Exit Else ToolTip("Suche Taste für Glücksrad 3") Sleep(1) ToolTip("") Sleep(1) Return $job1 EndIf EndFunc ;==>gluecksrad
  20. Something to chew on. If the error disappears you can call the tooltip clear then. Still doesn't make sense to call, wait 1ms and clear it. It's not even going to show up, or maybe will glitch.
  21. Hello, First of all thank you for this WebDriver solution @Danp2. Great work! Unfortunately I have the following problem: I am not able to clear $sObj4 value on the webpage using below code. Can I count on a little help? Many thank in advance #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession, $sObj, $sObj2, $sObj3, $sObj4 Local $website_link = 'https://www.podatki.gov.pl/wykaz-podatnikow-vat-wyszukiwarka' SetupChrome() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, $website_link) $sObj = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath,"//input[@id='inputType']") ; inputbox for TIN number $sObj2 = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath,"//label[@for='opt2']") ; radio button opt2 $sObj3 = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath,"//label[@for='vertical-checkbox2']") ; checkbox for date $sObj4 = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath,"//input[@id='inputType3']") ; inputbox for date??? _WD_ElementAction($sSession, $sObj2, 'click') ; Select Radio button 'NIP' Sleep(50) _WD_ElementAction($sSession, $sObj, 'value', '5260250995') ; Enter TIN number Sleep(50) _WD_ElementAction($sSession, $sObj3, 'click') ; Select checkbox related to date (enable $Obj4) Sleep(50) _WD_ElementAction($sSession, $sObj4, 'clear') ; !!!! Here is an issue with clearing element. May be incorrect element??? !!!!! Sleep(50) _WD_ElementAction($sSession, $sObj4, 'value', '01-06-2020') ; Enter a new date Func SetupChrome() _WD_Option('Driver', 'C:\Program Files (x86)\AutoIt3\Include\chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path=' & @ScriptDir & '\chrome.log') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true, "args":["start-maximized", "disable-infobars","user-data-dir=C:\\Users\\Computer\\AppData\\Local\\Google\\Chrome\\User Data"]}}}}' EndFunc
  22. I just added 1 millisec to let it faster Appear to try when i something changed if the error dissappears. Usally i use more than two functions and one functions calls to another function if a condition is reach. As i understand you right it seems dont finish the function if iam calling in that function another one?
  23. Well yea i have a problem with this: Sleep(1) ToolTip("") Sleep(1) Return gluecksrad() Mainly because of 2 things: a sleep of 1 (milisecond), is just too low of a value, and by the same token, after you set a tooltip, you clear the tooltip after 1ms, so it's all pointless. And then you do a return of a function, instead of a value, or variable. As i understand it, what you're doing here is calling this function inside of itself. This is recursion, you have to call the function from outside, or let it do it's thing. Really what i would do is put all this inside the main loop, if it's to be called continuously. If there is any incorrection in what i said, please do correct. Alternative code: ToolTip("Suche Taste für Glücksrad") ;set tooltip Sleep(1000) ;wait 1 second ToolTip("") ;clear TT Return $gluecksrad ;return the variable with the value of the pixelsearch Or just don't return the value, since it seems like you don't really need it.
  24. Yes, I was using the mentioned beta version. I just uninstalled AutoIt / SciTe and reinstalled everything and it started working. Not sure what the issue was, as I recently reinstalled windows and everything from scratch.
  25. Hello Guys, iam troubling a few days with a larger script, it is working fine but after a while i get a stack overflow message. Iam new in using Autoit and iam searching like 3 days to prevent stack overflow but nothing seems to work for me. Can someone explain what iam doing wrong and what i should do to prevent it? Thanks in advice. HotKeySet("{NUMPAD7}", "gluecksrad") HotKeySet("{DEL}", "stop") While 1 Sleep(100) WEnd Func stop() Exit EndFunc ;==>stop Func gluecksrad() $gluecksrad = PixelGetColor(164, 55) ;~ $Random2 = Random(4000, 4100 , 1) If $gluecksrad = 0xE5E5E5 Then ToolTip("") Sleep(100) Send("{s down}") Sleep(10) Send("{s up}") Exit Else ToolTip("Suche Taste für Glücksrad") Sleep(1) ToolTip("") Sleep(1) Return gluecksrad() EndIf EndFunc ;==>gluecksrad
  26. @Danp2Hello, Can you tell me how to take a screenshot of a browser running in headless mode? Maybe there is a function that can be linked to the button? P.S. I apologize for the stupid question.
  27. Hello everyone, I did search the forums for MS Teams related topics but did not find anything relating to abilities to post messages from AutoIt script to MS Teams channels. Is there any such possibility. Thanks a lot in advance.
  28. HurleyShanabarger, I see you have a "|" character in the abbreviation - have you downloaded and replaced the current file with the Beta version of Abbrev Manager to which I linked above? M23
  1. Load more activity
  • Create New...