Jump to content

tymo93

Members
  • Posts

    19
  • Joined

  • Last visited

tymo93's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I am trying to get Mouse Pos inside my GUI program and I cannot seem to figure it out. Once the my app is handle I want to use ControlClick with coordinates. How do I get handle of my parent GUI?
  2. Local $var = PixelGetColor(111, 174) MsgBox(0, "The decimal color is", $var) MsgBox(0, "The hex color is", Hex($var, 6)) Local $coord = PixelSearch(175, 148, 70, 70, Hex($var, 6)) If Not @error Then MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) EndIf This is the whole code I am using. First I want to know if I got the right color before I click it, using MsgBox.
  3. Yeah I know that... but I have another function which gets the color with PixerGetColor from a different x, y, Local $var = PixelGetColor(111, 174) and the result i use MsgBox(0, "The hex color is", Hex($var, 6)) and after this comes: $var[2] = PixelSearch(-x1-, -y1-, -x2-, -y2-, -colors-) mouseclick("left", $var[0], $var[1]) I replace -colors- with? I tried replacing it with Hex($var, 6) but nothing.
  4. Yes, I found that myself as well !! Thanks anyway .. now I want to put the -colors- with a result from Hex($var, 6) that comes with a hex value :-? How do I do that?
  5. can I do it using ControlClick? :-?
  6. I want to click a button by a color I have specified how do I do this? Can anyone provide me with the line script that clicks a button with the color I set?
  7. It does not Work For me... can you update please?
  8. THANKS!! It worked! Now I even understand more about functions :-? Thanks Again! You are a golden!
  9. How do I stop a loop that has been started using a button>function? Code: Func Start() Local $i = 0 Do ;Demo $i = $i + 1 Until $i = 500 EndFunc I want to stop this loop using a button. I have tried using different methods with $msg = $GUI_EVENT_CLOSE but no joy.
  10. Hmm, Yes, you may need to authenticated with the website. I don't think the image of the button really matters: When my mouse is over the button it does not show as clickable [a hand with the pointing finger] but if you click it works. Also, I have access to the frame level for now, the button is nested in a table and tds. The last third post I made shows the HTML code of the button.
  11. Don't know what to do from here... this is the final code I have been trying: #include <IE.au3> _IEErrorHandlerRegister() Global $oIE, $oFrame, $oTDs, $oButtons, $oButton, $oIE = _IECreate("http://vasthits.com/surf.php?sb=1&cash=&") $oFrame = _IEFrameGetCollection($oIE, 0) Local $oFrame = _IEFrameGetObjByName($oIE, "header") Local $oTDs = _IETagNameGetCollection($oFrame, 'td') Local $oButtons = _IETagNameGetCollection($oTDs, 'button') sleep (20000) For $oButton In $oButtons If $oButton.onClick = 'submitform(0);' Then _IEAction($oButton, 'click') ExitLoop EndIf Next _IELoadWait($oIE) --> IE.au3 V2.4-0 Error from function _IETagNameGetCollection, $_IEStatus_InvalidObjectType Why it doesnt find the button in the table?
  12. Yeah sorry, could not explain better but I already done it. I mean I found the frame that was under the frameset... anyway, Still need to know how to click on that javascript button. Source Code: var button=''; button+='<table border="0"id="table1"cellspacing="0"cellpadding="2"><tr><td>'; button+='<button type="submit" name="B5"style="height: 20; background-color: #00FF00; width:20" onclick="wrong();"></button></td>'; button+='<td>';button+='<button type="submit" name="B5"style="height: 20; background-color: #FF0000; width:20" onclick="wrong();"></button></td>'; button+='</tr><tr><td>';button+='<button type="submit" name="B5"style="height: 20; background-color: #FFFF00; width:20" onclick="submitform(3);"></button></td>'; button+='<td>';button+='<button type="submit" name="B5"style="height: 20; background-color: #0000FF; width:20" onclick="wrong();"></button></td>'; var button2='<button type="submit" name="B6" style="height: 20; background-color: #FFFF00; width:20" disabled></button>';function incrCount(){ window.status="Please Wait..."; The Button that needs to be clicked is submitform(3);. I have tried with navigate but nothing.. I will try with somethink else.
  13. Ok I got a bit further after I got the message error under the debug with "--> IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidObjectType" I runned this code: #include <IE.au3> _IEErrorHandlerRegister() $oIE = _IECreate("http://vasthits.com/surf.php?sb=1&cash=1") $oFrame = _IEFrameGetCollection($oIE, 0) If @error Then Exit MsgBox(0, "Frame Info", _IEPropertyGet($oFrame, "height")) If IsObj($oFrame) Then ConsoleWrite("Debug: $ex = object (" & ObjName($oFrame) & ")" & @LF) Else ConsoleWrite("Debug: $ex is not an object" & @LF) EndIf So I got this at the debug message: Debug: $ex = object (HTMLWindow2) How do I set the object type now? :-?
  14. Yes, that might work, but I have single link with page where is another webpage/link in frameset/frame. So I need to re-attach it to that link where it contains the actual Javascript code. So I tested for frames presence using this: #include <IE.au3> _IEErrorHandlerRegister() $oIE = _IECreate("http://vasthits.com/surf.php?sb=1&cash=1") $oFrame = _IEFrameGetCollection($oIE, 0) If @error Then Exit MsgBox(0, "Frame Info", _IEPropertyGet($oFrame, "header")) but it comes with 0 at Frame Info. any idea?
  15. Thanks for reply! After research, I found this: http://vasthits.com/surfbars/multisurfba...=0&s=&id=1&cat=&dir=&&cash=0 The actual link, and inside code is not even written in html, its pure java after you go down a bit. Maybe thats why it didn't work? :-? Oh well, if it is that way, what command shall I use to get the Javascript button?
×
×
  • Create New...