Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Thanks it works, the controller moves. Unfortunately it does not work on the desired homepage. This is probably due to the programming of the page.
  3. Today
  4. this may not be the most efficient way to do this but it picks all the random numbers and doesn't repeat them. I disabled the mouseclicks so it wasn't clicking everywhere while i was testing it. #include <Array.au3> HotKeySet("{ESC}", "Terminate") Func Terminate() Exit 1 EndFunc Global $TrackerA,$TrackerB,$countA=0,$countB=0,$boolA,$boolB dim $array_e[10] for $x=0 to 9 $array_e[$x]=$x+947 Next dim $array_f[16] for $x=0 to 15 $array_f[$x]=$x+209 Next dim $array_g[14] for $x=0 to 13 $array_g[$x]=$x+993 Next dim $array_h[9] for $x=0 to 8 $array_h[$x]=$x+213 Next $boolA=true $boolB=true while 1 $randE=Random(0,9,1) $randF=Random(0,15,1) $randG=Random(0,13,1) $randH=Random(0,8,1) if IsArray($TrackerA) and $countA<160 Then for $x=0 to UBound($TrackerA)-1 if $TrackerA[$x][0]=$randE Then if $TrackerA[$x][1]=$randF Then $boolA=False ExitLoop endif Else $boolA=True EndIf Next EndIf if $boolA=True and not IsArray($TrackerA) Then Dim $TrackerA[1][2] $TrackerA[0][0]=$randE $TrackerA[0][1]=$randF ;MouseClick("left",$array_e[$randE],$array_f[$randF]) $countA+=1 ElseIf $boolA=True and IsArray($TrackerA) Then ReDim $TrackerA[UBound($TrackerA)+1][2] $TrackerA[UBound($TrackerA)-1][0]=$randE $TrackerA[UBound($TrackerA)-1][1]=$randF ;MouseClick("left",$array_e[$randE],$array_f[$randF]) $countA+=1 EndIf if IsArray($TrackerB) and $countB<126 Then for $x=0 to UBound($TrackerB)-1 if $TrackerB[$x][0]=$randG Then if $TrackerB[$x][1]=$randH Then $boolB=False ExitLoop endif Else $boolB=True EndIf Next EndIf if $boolB=True and not IsArray($TrackerB) Then Dim $TrackerB[1][2] $TrackerB[0][0]=$randG $TrackerB[0][1]=$randH ;MouseClick("left",$array_g[$randG],$array_h[$randH]) $countB+=1 ElseIf $boolB=True and IsArray($TrackerB) Then ReDim $TrackerB[UBound($TrackerB)+1][2] $TrackerB[UBound($TrackerB)-1][0]=$randG $TrackerB[UBound($TrackerB)-1][1]=$randH ;MouseClick("left",$array_g[$randG],$array_h[$randH]) $countB+=1 EndIf $boolA=False $boolB=False if $countA>=160 and $countB>=126 Then ExitLoop EndIf WEnd _ArrayDisplay($TrackerA) _ArrayDisplay($TrackerB)
  5. Wow - thanks. I'll try it. I'm not familiar with embedded IE. Time to learn.
  6. yes they are both mischaracterizations...like i said if i was misled by anything it was by the help file... and again what sense does it make to describe something that is "effectively" as itself? If i hit a nail with a pipe the pipe is effectively a hammer. If i hit a nail with a hammer its not effectively a hammer...its just a hammer....
  7. I am making a program and I did a multi windows they are opening OK but when I close the mini window all the program closes #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIconstants.au3> #NoTrayIcon gui1() Global $guipickf = GUICreate("Pick", 200, 180, -1, -1, -1, $WS_EX_TOPMOST) Global $guipickt =GUICreate("Pick", 200, 180, -1, -1, -1, $WS_EX_TOPMOST) Func gui1() HotKeySet("{esc}","myExit") Global $dwf1 = GUICreate("Asda", 275, 175, 342, 292) Global $brun = GUICtrlCreateButton("Run", 96, 144, 75, 25, $BS_DEFPUSHBUTTON) Global $tx2 = GUICtrlCreateInput("", 104, 80, 57, 21) $rec = GUICtrlCreateLabel("Hunt Area", 88, 8, 104, 28) GUICtrlSetFont(-1, 18, 400, 0, "MS UI Gothic") GUICtrlSetColor(-1, 0x000000) Global $ty2 = GUICtrlCreateInput("", 208, 80, 57, 21) $recx = GUICtrlCreateLabel("X :", 72, 80, 26, 24) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000000) $Label1 = GUICtrlCreateLabel("Y :", 176, 80, 26, 24) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000000) Global $tmc = GUICtrlCreateInput("", 136, 112, 97, 21) Global $tx1 = GUICtrlCreateInput("", 104, 48, 57, 21) Global $ty1 = GUICtrlCreateInput("", 208, 48, 57, 21) $Label3 = GUICtrlCreateLabel("X :", 72, 48, 26, 24) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000000) $Label4 = GUICtrlCreateLabel("Y :", 176, 48, 26, 24) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000000) $posf = GUICtrlCreateButton("From", 8, 48, 51, 21, $BS_DEFPUSHBUTTON) $post = GUICtrlCreateButton("To", 8, 80, 51, 21, $BS_DEFPUSHBUTTON) $mcp = GUICtrlCreateButton("Monster Color", 32, 112, 83, 21, $BS_DEFPUSHBUTTON) GUISetState(@SW_SHOW) Local $aMsg While 1 $aMsg = GUIGetMsg(1) ; Use advanced parameter to get array Switch $aMsg[1] ; check which GUI sent the message Case $dwf1 Switch $aMsg[0] ; Now check for the messages for $hGUI1 Case $GUI_EVENT_CLOSE ; If we get the CLOSE message from this GUI - we exit <<<<<<<<<<<<<<< ExitLoop Case $posf GUICtrlSetState($posf, $GUI_DISABLE) runposf() Case $post GUICtrlSetState($post, $GUI_DISABLE) runpost() EndSwitch Case $guipickf Switch $aMsg[0] ; Now check for the messages for $g_hGUI2 Case $GUI_EVENT_CLOSE ; If we get the CLOSE message from this GUI - we just delete the GUI <<<<<<<<<<<<<<< GUIDelete($guipickf) GUICtrlSetState($posf, $GUI_ENABLE) EndSwitch Case $guipickt Switch $aMsg[0] ; Now check for the messages for $g_hGUI2 Case $GUI_EVENT_CLOSE ; If we get the CLOSE message from this GUI - we just delete the GUI <<<<<<<<<<<<<<< GUIDelete($guipickt) GUICtrlSetState($post, $GUI_ENABLE) EndSwitch EndSwitch WEnd EndFunc ;==>gui1 Func runposf() HotKeySet("{p}", "pickposf") Global $guipickf = GUICreate("Pick", 200, 180, -1, -1, -1, $WS_EX_TOPMOST) GUICtrlCreateLabel("Mouse Coord.:", 10, 10) Global $MousePos=GUICtrlCreateInput("", 100, 10, 90, 20, $ES_READONLY) GUICtrlCreateLabel("Decimal Code: ", 10, 40) Global $PixelColor=GUICtrlCreateInput("", 100, 40, 90, 20, $ES_READONLY) GUICtrlCreateLabel("Hex Code:", 10, 70) Global $hexColor=GUICtrlCreateInput("", 100, 70, 90, 20,$ES_READONLY) GUICtrlCreateLabel("Color:", 10, 100) Global $MostrarColor=GUICtrlCreateLabel("", 100, 100, 90, 20,$ES_READONLY) GUICtrlCreateLabel("Press P to Pick Position/Color.", 0, 140 ,200, 15, $SS_CENTER) GUICtrlSetColor(-1,0x00808080) GUISetState() While 1 $msg=GUIGetMsg() While 1 Sleep(25) Global $pos=MouseGetPos() $color=PixelGetColor($pos[0],$pos[1]) GUICtrlSetData($MousePos,"X="&$pos[0]&" Y="&$pos[1]) GUICtrlSetData($PixelColor,$color) $HEX6=StringRight(Hex($color),6) GUICtrlSetData($hexColor,"#"&$HEX6) GUICtrlSetBkColor($MostrarColor,"0x"&Hex($color)) WEnd ; We can only get messages from the second GUI Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete($guipickf) ExitLoop EndSwitch WEnd EndFunc ;==>gui2 Func runpost() #include <GUIconstants.au3> #NoTrayIcon Global $Paused HotKeySet("{p}", "pickpost") Global $guipickt =GUICreate("Pick", 200, 180, -1, -1, -1, $WS_EX_TOPMOST) GUICtrlCreateLabel("Mouse Coord.:", 10, 10) Global $MousePos=GUICtrlCreateInput("", 100, 10, 90, 20, $ES_READONLY) GUICtrlCreateLabel("Decimal Code: ", 10, 40) Global $PixelColor=GUICtrlCreateInput("", 100, 40, 90, 20, $ES_READONLY) GUICtrlCreateLabel("Hex Code:", 10, 70) Global $hexColor=GUICtrlCreateInput("", 100, 70, 90, 20,$ES_READONLY) GUICtrlCreateLabel("Color:", 10, 100) Global $MostrarColor=GUICtrlCreateLabel("", 100, 100, 90, 20,$ES_READONLY) GUICtrlCreateLabel("Press P to Pick Position/Color.", 0, 140 ,200, 15, $SS_CENTER) GUICtrlSetColor(-1,0x00808080) GUISetState() While 1 $msg=GUIGetMsg() While 1 Sleep(25) Global $pos=MouseGetPos() $color=PixelGetColor($pos[0],$pos[1]) GUICtrlSetData($MousePos,"X="&$pos[0]&" Y="&$pos[1]) GUICtrlSetData($PixelColor,$color) $HEX6=StringRight(Hex($color),6) GUICtrlSetData($hexColor,"#"&$HEX6) GUICtrlSetBkColor($MostrarColor,"0x"&Hex($color)) WEnd While 1 ; We can only get messages from the second GUI Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete($guipickt) ExitLoop EndSwitch WEnd WEnd EndFunc Func myExit() Exit EndFunc Func pickposf() GUICtrlSetData($tx1,$pos[0]) GUICtrlSetData($ty1,$pos[1]) EndFunc Func pickpost() GUICtrlSetData($tx2,$pos[0]) GUICtrlSetData($ty2,$pos[1]) EndFunc
  8. Yesterday
  9. Was either of those mischaracterizations? You said you lead yourself to believe something that was wrong, so you mislead yourself. Second, you seemed to not understand the meaning of effectively, the meaning of is "in such a manner as to achieve a desired result.", or "in effect". Which means to me that the array data is starting at zero rather than at 1 effectively. That's all, nothing more.
  10. I found this -- https://github.com/web-platform-tests/wpt/issues/20734. Also this is the functionality being implemented in that portion of _WD_ElementAction -- https://www.w3.org/TR/webdriver/#element-send-keys So, it makes sense in hindsight that this doesn't work with input elements where you don't set their value by sending keystrokes. Looks like we'll need to use _WD_ExecuteScript to handle this for now. FYI, you should be able to do this without jQuery, ie -- _WD_ExecuteScript($sSession, "arguments[0].value="&$i&";", $sJsonElement)
  11. @Maxxx23 Unsure why _WD_ElementAction isn't working for this. In the mean time, I've found a way to do it when the site uses jQuery. Here's an example -- #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession, $sElement, $sJsonElement SetupChrome() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://www.html5tutorial.info/html5-range.php") $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='slider1']") $sJsonElement = '{"' & $_WD_ELEMENT_ID & '":"' & $sElement & '"}' For $i = 100 to 500 Step 10 _WD_ExecuteScript($sSession, "$(arguments[0]).val("&$i&").change()", $sJsonElement); Sleep(500) Next Func SetupChrome() _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true, "args":["--user-data-dir=C:\\Users\\' & @UserName & '\\AppData\\Local\\Google\\Chrome\\User Data\\", "--profile-directory=Default"]}}}}' EndFunc Func SetupGecko() _WD_Option('Driver', 'geckodriver.exe') _WD_Option('DriverParams', '--log trace') _WD_Option('Port', 4444) $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"browserName": "firefox", "acceptInsecureCerts":true}}}' EndFunc
  12. I have removed all other lines from your script and only called _OL_ItemRecipientCheck for a SMTP address (john.doe@gmx.com) and my Exchange account (firstname lastname). Can you please insert a _Arraydisplay($aRecipient) after _OL_ItemRecipientCheck in your script? Do you still see a leading equals sign?
  13. @Maxxx23 There's an example of this in the DemoElements function in wd_demo.au3
  14. Hello, Is it possible to find out the XY coordinates of an HTML element with WebDriver UDF. I didn't find anything about it, just outdated information from IE UDF. I would be very grateful for a code snippet. Since I'm a beginner.
  15. Thanks for your quick reply. Unfortunately, it doesn't work either. It happens exactly the same as with my code snippet.
  16. Sure... when $bFail is true, there will be an equals sign in the name of the recipient in the distribution list and in their email. (I removed error checking, but it ran for me)
  17. What this script does Extracts the list of GDPR fines from website enforcementttracker.com and returns a 2D array holding all items. WebDriver functionality used Tested with Firefox Start geckodriver to automate Firefox from a different location (needs to be modified by you in the scripts source) Maximize the browser window Set the value of a dropdown Sort the table by clicking on a table header Scroll to the end of the page Search and click a button GDPR fines.au3
  18. Thanks JLogan3o13 and Nine - both excellent suggestions, thank you! Since I already have experience using EventCreate in another AutoIt application, I think I'll give that a try first. Again, I really appreciate the suggestions, neither had occurred to me before. All the best, -Mike
  19. I guess that's exactly what @geezersoze wants, so deleting the program would of course be the easiest solution. Normally the script would be terminated at the latest, when the computer is shut down. So I assume that it will be restarted when the system is rebooted. In this case it might be advisable to remove the autostart entry as well, or what would you recommend?
  20. The WebDriver UDF provides a toolbox full of functions to facilitate automating Web browsers. Still scripts can become quite complex. In this thread users can post "real life" examples to show how specific tasks can be implemented. Note When posting an example please describe the purpose of the script and the WebDriver functionality used!
  21. Look at SQLite udf. You could register every single executions then make all the aggregates you want easily after...
  22. Event viewer would be the standard way. Have your script write out to the Event Log, with a specific event code. You can then write code to parse the event logs later and extract the data you're after. Look at the _eventlog_* functions in the help file, or do something as simple as: ShellExecute("EventCreate.exe", '/L Application /T Information /SO "Windows Installer" /ID 666 /D "Windows Installer 4.5 Installed Successfully"', "", "", @SW_HIDE)
  23. Hello, I have an AutoIt application that's run about 30-50 times a day from a server, and my management is interested in knowing exactly how many times it's run per day, and per month...mainly to see trends in usage. Without doing the work for me, can anyone offer a suggestion (method or example) as to how I would keep track of an execution count variable that is updated from multiple machines? Again, per day and per month are the metrics I'm after...I don't mind doing the per year calculation. Thanks for any suggestions, -Mike
  24. You mean you want to remove your own script from your own system, that you have written on your own ? Try the DOS command : del MyScript.*
  25. Try and see how _WinAPI_GetIdleTime() may be useful to you
  26. In the wiki you will find a script to test data before using _Excel_RangeWrite. I will test if this script can be extended to check for NULL values as well.
  1. Load more activity
×
×
  • Create New...