Jump to content

guestscripter

Active Members
  • Posts

    90
  • Joined

  • Last visited

Profile Information

  • Location
    Vienna

Recent Profile Visitors

720 profile views

guestscripter's Achievements

  1. https://www.autoitscript.com/forum/applications/core/interface/file/attachment.php?id=48056
  2. You're going in the right direction I think by how you are considering usage of your $marker variabl. The main thing you need to do is use the Returned Data in $marker from the _ImageSearch function to change the starting points for the next search on every loop after every previous result. Only on the first search do you want the search to begin at 0,0 which are your $yy and $$xx variables. You want to update those variables after every previous result. You're gonna get in twouble here if that's game automation related, tss tss tss Don't have the time right now to write or test any actual script for you but I hope the idea is clearer now
  3. Have tried and failed at finding a solution myself. Crazy idea though; maybe it could be done. If the "minimized" window is actively being rendered on a pseudo external monitor, i.e. not in focus and not physically visible by the user, so the same thing as minimized. This is going to be difficult to make write as a script, but it's the only possibility with potential, if somebody would want to try. The important thing is that your System and Windows and the GUI should think that the GUI is visible, although it isn't...
  4. The way you describe what you are trying to do it's difficult to understand what the purpose should be. It would help if you give some examples with what the inputs would be and what the output should be. I played around with your script to make it work, just it's kind of pointless the way it is, since your conditions ("1st input contains c and not b" etc.) only allow for one result "car". #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Word1 = "car" $Word2 = "cat" $Word3 = "cee" $Word4 = "bar" $Word5 = "bat" Local $11 = "c", $12 = "b" Local $21 = "a", $22 = "b" Local $31 = "r", $32 = "t" #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 364, 259, 192, 114) $Input1 = GUICtrlCreateInput("cxx", 16, 24, 121, 21) $Input2 = GUICtrlCreateInput("axx", 16, 72, 121, 21) $Input3 = GUICtrlCreateInput("rxx", 16, 112, 121, 21) $Button1 = GUICtrlCreateButton("GO!", 24, 168, 97, 65) $Edit1 = GUICtrlCreateEdit("", 192, 24, 129, 217, BitOR($GUI_SS_DEFAULT_EDIT, $ES_CENTER)) GUICtrlSetData(-1, "Edit1") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ControlClick($Form1,"",$Button1);Autoclick button on startup While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 ; Check if $Input1 has a "c" or a "b" in it ; If $Input1 has a "c" and not a "b" it will check $Input2 and see if it has an "a" or an "e" in it. If (StringInStr(GUICtrlRead($Input1), $11) > 0) And (Not (StringInStr(GUICtrlRead($Input1), $12) > 0)) Then ; If $Input2 has an "a" and not an "e" in it, it will continue to $Inputbox3 and check if it has an "r" or a "t". If (StringInStr(GUICtrlRead($Input2), $21) > 0) And (Not (StringInStr(GUICtrlRead($Input2), $22) > 0)) Then ; If Input3 has an "r" and not a "t" it should find out which word listed above matches with the word spelled out in the inputboxes. If (StringInStr(GUICtrlRead($Input3), $31) > 0) And (Not (StringInStr(GUICtrlRead($Input3), $32) > 0)) Then $sCombination = $11 & $21 & $31 $sWordsMatch = "" If $sCombination = $Word1 Then $sWordsMatch &= $Word1 & @CRLF If $sCombination = $Word2 Then $sWordsMatch &= $Word2 & @CRLF If $sCombination = $Word3 Then $sWordsMatch &= $Word3 & @CRLF If $sCombination = $Word4 Then $sWordsMatch &= $Word4 & @CRLF If $sCombination = $Word5 Then $sWordsMatch &= $Word5 & @CRLF GUICtrlSetData($Edit1, $sWordsMatch);Data is the words listed above that match the input from the inputboxes. EndIf EndIf EndIf EndSwitch WEnd I'm confused and slightly curious as to the point, so let us know!
  5. You're trying to solve anagrams, right?
  6. For ControlClick (and ControlSend) there's a trick: You want the window $handle as the title (you did that already) and in case you don't have a specific control, also the controlID part as the window $handle (you left it empty as "") That may just fix it for you, I hope it helps :-) Also check the coordinates you are clicking maybe. Careful about absolute vs. window coordinates etc. etc. $hWin = WinGetHandle("Q-MATIC Monitor™ 3") ControlClick($hWin, "", $hWin, "Left", 1, 92, 57)
  7. Or as a quick, simple and rough fix, PixelCheckSum....
  8. If the "Autoit Window Info" tool really can't find the button, and alternatives to this tool (WinSpy++ is one of the names I think I remember) don't either, _ImageSearch() could help you, but we warned if you go in this direction different screen resolutions etc. etc. may become a hassle on different computers.
  9. Benefit of posting in the Forum vs in the Wiki: Feedback, Appreciation, Comments, Update Notifications per E-Mail... IMHO maybe there could be a "Snippets 2015", "Snippets 2015" Thread in the forum, or maybe even "Snippets November 2015" etc. then it never gets much too long... Personally I like checking out new posts in this thread. Just wanted to give some counter arguments to the above.
  10. Alright so this gives me more useful info on understanding what's going on in terms of events... especially this part I didn't know about before; http://stackoverflow.com/questions/10213703/how-do-i-view-events-fired-on-an-element-in-chrome-web-developer Now what I could really use help with is learning how to manipulate/stop/pause these events manually.... any tips much appreciated!
  11. https://www.autoitscript.com/forum/topic/161333-_newiecreatepseudoembedded-create-embedded-ie-frame-with-latest-ie-version I think this is what you need.
  12. Hi, I've been tinkering and tinkering and I really hope someone can give me some advice. I've used the IE.au3 UDF successfully with some different scripts, just I'm not even sure I'm going in the right direction on this one. A bunch of text input fields on a secure site are to be updated with data in the script (which the script gets from an excel file), and submitted. Not too hard, right? The input fields html looks like this: (in this case current value is 777.00) <input id="pt1:r1:1:pt1:ghostText:i10:0:lvl2:0:lvl3:0:lvl3PrcHdr:i15:0:lvl3Prc:ot21::content" name="pt1:r1:1:pt1:ghostText:i10:0:lvl2:0:lvl3:0:lvl3PrcHdr:i15:0:lvl3Prc:ot21" class="x25" type="text" value="777.00" title="777.00">I've tried _IEFormElementSetValue($oObj, $sInput, 0) _IEFormElementSetValue($oObj, $sInput, 1) $oObj.setAttribute("value", $sInput) $oObj.setAttribute("title", $sInput) _IEAction($oObj, "focus") $oObj.fireEvent("onfocus")in various combinations and orders, and the trouble is always that some fields are "skipped" or revert back to their previous value a few seconds later. Even though not actually submitting ie. clicking the "Save Changes" button on the page, some kind of processing is already going when anything is changed/focused etc., as far as I can see. What else I have tried: Using ControlSend($g_oIEHandle, "", "[CLASSNN:Internet Explorer_Server8]", $sInput) in combination with a lot of MouseGetCursor() I have a more simple script roughly "working" (doesn't use any IE objects). It works by waiting for a normal mousecursor for the page to be "ready" again in between inputfields... ...and this ends up being very slow and not much faster than human entry, and "only" fails sometimes (which is why there is a checking function as well, though this also adds to the time taken). So what can I do? From some research I've done, I understand there may be some way to cancel events (I know as much as that events have a propery "cancelable"). Maybe we can stop any javascript function from being called while filling all the input fields somehow, so that none of the input gets lost.Could this help? How to do this? One other idea is with POST and GET, so that the data that is usually submitted to the site on "Save Changes" can be sent without interface interaction... would this probably be very difficult to attempt? Where to start? (https...) Please, any thoughts, guidance on the above, or ideas/approaches I haven't thought of?
×
×
  • Create New...