Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Welcome to AutoIt and the forum! What have you tried so far?
  3. Hi Guys, im sry to ask u, but im very new to this and im trying to figure out, how i can automate a anoying thing on my work. Its costs me nearly a whole day, just for a few steps, cause i have to stay on my computer to press some buttons, so it doesnt stop. I made it work to login with WebDriver UDF and now i have to find the right Buttons and press them. I tried to to this with this: Func _WD_LinkClickByText($sSession, $sText, $lPartial = True) Local Const $sFuncName = "_WD_LinkClickByText" Local $sElement = _WD_FindElement($sSession, ($lPartial) ? $_WD_LOCATOR_ByPartialLinkText : $_WD_LOCATOR_ByLinkText, $sText) Local $iErr = @error If $iErr = $_WD_ERROR_Success Then _WD_ElementAction($sSession, $sElement, 'click') $iErr = @error If $iErr <> $_WD_ERROR_Success Then Return SetError(__WD_Error($sFuncName, $_WD_ERROR_Exception), $_WD_HTTPRESULT) EndIf Else Return SetError(__WD_Error($sFuncName, $_WD_ERROR_NoMatch), $_WD_HTTPRESULT) EndIf Return SetError($_WD_ERROR_Success) EndFunc But it allways says: "C:\Users\...au3" (25) : ==> Duplicate function name.: Func _WD_LinkClickByText($sSession, $sText, $lPartial = True) Would be awesome if someone could help me Thx Guys!
  4. After further experimentation, it seems that the problem lies with the ScreenCapture UDF, not the Print UDF, as SQlite will also not start up after _ScreenCapture was invoked. However, this problem seems to occur only when running uncompiled script. Once compiled, it seems to work OK.
  5. Today
  6. I need to create a script read values from excel sheet cell by cell then added in calculator
  7. I see, that is interesting. I do the same, it works good enough when you follow safe practices. Not sure about MalwareBytes, I never used it.
  8. Could create a batch file that hopefuly grabs the original username $RF = Random(100000, 999999, 1) & '.bat' $FO = FileOpen($RF, 10) $FW = FileWrite($FO, 'cd %UserProfile%' & @CRLF & 'pause'); 'del ' & $RF) FileClose($FO) Run($RF) This is a proof of concept, if it does work, this can be changed to write into a txt file or something.
  9. @Musashi's script works well because it basically traps the flow of the script at any time, meaning you can pause between actions in a function. There are some cases where you may need that the script continues and not be stuck in a loop like that, for those cases you can go with something like this: Global $g_bPaused = 1 HotKeySet("{F2}", "_TogglePause") HotKeySet("{ESC}", "_Terminate") While 1 If $g_bPaused = 0 Then ;Stuff EndIf WEnd Func _TogglePause() If $g_bPaused = 0 Then $g_bPaused = 1 ToolTip('Script is "Paused"', 0, 0) Else $g_bPaused = 0 ToolTip('Script is "Running"', 0, 0) EndIf Sleep(1000) ToolTip("") EndFunc ;==>_TogglePause Func _Terminate() Exit EndFunc ;==>_Terminate It's different in that, the loop keeps going and other things may still work, if you have them in the main loop, but this would not stop in the middle of the action, it would only pause at the end of the actions, i hope i can get the message across, sometimes is difficult to me.
  10. Thanks for your reply. that's doing quite exactly, what I was asking for. Except, that the script has to be compiled. ;~ must *NOT* be used: #RequireAdmin ;~ Script needs to be compiled to work ;~ Running directly will use the executors UserProfileDir as a switch and then prompt for UAC ;~ Can also use <@ScriptFullPath> --UserProfileDir %UserProfile% #include <WinAPIProc.au3> Global $g_sUserProfileDir = _GetCmdLineValue("UserProfileDir", @UserProfileDir) If Not _WinAPI_IsElevated() Then ShellExecute(@ScriptFullPath, "--UserProfileDir " & $g_sUserProfileDir, "", "RunAs") Exit EndIf MsgBox(4096, "UserProfileDir", $g_sUserProfileDir) Func _GetCmdLineValue($sCmdLine, $vResult = Null) For $i = 1 To $CmdLine[0] If $CmdLine[$i] = "/" & $sCmdLine Or $CmdLine[$i] = "-" & $sCmdLine Or $CmdLine[$i] = "--" & $sCmdLine Then If $CmdLine[0] >= $i + 1 Then If StringLeft($CmdLine[$i + 1], 1) = "/" Or StringLeft($CmdLine[$i + 1], 1) = "-" Or StringLeft($CmdLine[$i + 1], 2) = "--" Then Return $vResult Else Return $CmdLine[$i + 1] EndIf EndIf EndIf Next Return $vResult EndFunc
  11. If i understand corretly, i believe so, a simple question of setting that macro @UserProfileDir into a variable on the top of the script, and then use it afterwards. As an extreme measure, you could have another exe, that runs and writes to an ini file the profile dir, and then your main script would read from ini. Or maybe im just complicating things without need.
  12. post the code comunity will help you , dont be shy
  13. There's the possibility of opening another window into the new path, and once that one is present, place it exactly under the current window, same size and all, and then just close the current window, and change focus to the new one. It's a mess, i know. I think explorer was not designed to be explored programmaticaly, and really, why would anyone need something like that? People have a mouse, they can click to wherever they need, you see?
  14. I'm *NOT* interested in *SELF* elevating the script. Exactly that's, what I don't want to work: The regular users shall not be granted the possibility to bypass UAC in any means. What I need is to write few registry values to parts of the registry, the normal user has no write access to. (An for security reasons *SHALL* not have write access to! It would be an easy thing to simply grant write access to the "Local-User-Windows-Group", but that's what I don't want to do) I want to *PASS* the information of the currently-logged-on-userprofile-dir-path to the script to be processed within the script itself, after I personally entered the credentials for the UAC elevation process.
  15. Here a simulation with MouseMove : ; Press Esc to terminate script, Pause/Break to "pause" Global $g_bPaused = False HotKeySet("{PAUSE}", "_TogglePause") HotKeySet("{ESC}", "_Terminate") HotKeySet("+!d", "_StartScript") ; Shift-Alt-d While True Sleep(100) WEnd Func _TogglePause() $g_bPaused = Not $g_bPaused While $g_bPaused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>_TogglePause Func _Terminate() Exit EndFunc ;==>_Terminate Func _StartScript() ToolTip("Script is running > move mouse to 10,100", 0, 0) MouseMove(10, 100) Sleep(2000) ToolTip("move mouse to 200,200", 0, 0) MouseMove(200, 200) Sleep(2000) ToolTip("move mouse to 400,200", 0, 0) MouseMove(400, 200) Sleep(2000) ToolTip("move mouse to 600,300", 0, 0) MouseMove(600, 300) Sleep(2000) ToolTip("", 0, 0) EndFunc ;==>_StartScript Automation or script interaction with games or game servers, regardless of the game, is not allowed.
  16. pdvos, That error is often caused by your AV thinking that Aut2Exe is acting strangely by trying to amend the resource table of an executable file. Try adding that folder to your AV exceptions list and see if it works then. M23
  17. Hello I tried to compile with the latest autoit version and scite editor available but it fails during the process with a aut2exe error (see below) I saw some fixes in the posts before this page. So I added #include <WinAPISys.au3> #include <WinAPISysWin.au3> #include <WinAPIProc.au3> Set Global Const $WH_CBT = 5 And commented out ;~ Global Const $SND_ASYNC = 0x00000001 ;~ Global Const $SND_MEMORY = 0x00000004 ;~ Global Const $SND_NOSTOP = 0x00000010 But it fails during the compile with a Aut2Exe error --------------------------- Aut2Exe Error --------------------------- Error: Unable to add resources. C:\Users\pdv\AppData\Local\AutoIt v3\Aut2Exe\aut4148.tmp.exe --------------------------- OK --------------------------- I wanted to use this tool to convert blat.dll and try if I could make ik work with that subrogation script and see if I can include a dll in my program. would there be somebody willing to point me in the right direction? Beste regards, Peter
  18. No, isn't posting automation about gaming not allowed?
  19. Been dorking around with Autoit for about a week and this language is the first i've ever even attempted to learn and i'm really loving all the cool automation that is possible with this languie. In no, shape, or form am I an expert as you'll see below from my very basic code. I've made a basic outline of this very basic script I am trying to make and it works flawlessly, only issue is I want this script to run until I press a hotkey. How would I go about making a start and a stop hotkey for a whole script? WinActivate("Runner") sleep(250) MouseClick("left",957,590) Sleep(5500) MouseClick("left",951,637) Sleep(3500) MouseClick("left",939,585) sleep(2500) MouseClick("left",1037,568) Sleep(6750) MouseClick("left",1036,572) Sleep(2000) MouseClick("left",951,472) Sleep(3750) MouseClick("left",927,501) Sleep(7250) MouseClick("left",780,584) Sleep(4000)
  20. thank you careca, it indeed works, thank you. I will use it so far. It would be more elegant, if the path changes "silently" in the background. Hopefully someone has an good idea.
  21. Really? I dropped eset ys ago due to all it’s windows issues. It’s garbage. Use windows built-in defender and that’s all you need maybe Malwarebytes in addition
  22. Maybe there is a better way, but this is what i got $Title = 'Program Files' ShellExecute('explorer.exe', 'C:\Program files') Sleep(2000) If WinActive($Title) Then ControlClick($Title, "", 1001, "left", 1) Send('C:\Windows'&"{ENTER}") EndIf
  23. @careca thankyou when i runit as admin it works with me thank you very much
  24. From https://www.autoitscript.com/site/autoit/downloads/ -- P.S. Why would you still be developing for such an out-of-date OS?
  25. i tried chrome.exe, skype.exe and NVDA.exe and jfw.exe all give me 0
  26. @DonChunior I haven't used that browser, so I'm not sure how much help I can be. I did have a few questions / comments -- You are using an older version of the Webdriver UDF. Please update to the latest version (0.3.0.1) There's a newer version of the WinHTTP UDF. Grab the source from here. What version of Geckodriver are you attempting to use? Why the switch from port 4444 to 9150?
  1. Load more activity
×
×
  • Create New...