Jump to content

IamKJ

Members
  • Posts

    18
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

IamKJ's Achievements

Seeker

Seeker (1/7)

1

Reputation

  1. The second code you posted worked beautifully every time. It doesn't work all the time with the milliseconds, but that's fine, have found a way around that with using the sleep time and converting milliseconds into sleep time. Thanks a lot!
  2. It worked with the msgbox, but anything else I try to put after the Until statement just makes the original message box pop up.
  3. That worked perfectly. However, it won't allow me to use the _Msec function in _TimeToTicks, which returns milliseconds.
  4. Yes, but those only act from when it was called. I want to go off of system time. For example, this script would ask them to input time to execute, so I'd put "03:30:00:000", and I'd like for it to execute at 3:30 A.M. I can get the system time displayed fine and everything, but can't figure out how to get autoit to read the time as a string and execute when that system time string reaches to time specified. It might be possible/easier for it to read the time as a whole number, maybe if you add all the times (hh + mm + ss + ms) and get a whole number, that might work, but not sure how to get autoit to read the system time as a string or integer.
  5. I am trying to allow the GUI to gather info as to when to execute a function. I am having trouble doing this. So far this is what I have. ;Timer Func timer () If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(36,"Timer","Please format your answer in 00:00:00:000") Select Case $iMsgBoxAnswer = 6 ;Yes Global $infotime = InputBox ('Time', 'What time to execute?') Do $rawtimer = ToolTip(@Hour & ':' & @Min & ':' & @Sec & ':' & _MSec()) until $rawtimer = $infotime if $rawtimer = $infotime Then msgbox (0,'Worked','Worked') Else EndIf Case $iMsgBoxAnswer = 7 ;No Exit EndSelect EndFunc Func _MSec() Local $stSystemTime = DllStructCreate('ushort;ushort;ushort;ushort;ushort;ushort;ushort;ushort') DllCall('kernel32.dll', 'none', 'GetSystemTime', 'ptr', DllStructGetPtr($stSystemTime)) $sMilliSeconds = StringFormat('%03d', DllStructGetData($stSystemTime, 8)) $stSystemTime = 0 Return $sMilliSeconds EndFunc I have also tried _GUIToolTip_GetText in order to read the tooltip until the time specified, but it still doesn't work. Any help would be great.
  6. So I have a lot of different functions in the little program I'm making. Most of them use the Do statement, such as finding images, clicking buttons, etc. The question I have is how would I be able to both 1) Create a hotkey to pause whatever I am doing at the moment. If I have to put something into every function in the program, I don't mind. 2) Create a hotkey to exit whatever I am doing and stop all loops or commands and bring back the main GUI?
  7. Just upped the tolerance a bit, somewhere between 50-100 is a good start, if there aren't too many images like the one you are searching for.
  8. Basically I'm trying to figure out what would be the most efficient means of making multiple use buttons. What I'd like is to be able to click a button and pop up a msgbox to gather some info, or two message boxes, but upon entering that info and the msgbox dialogue being over, it'll then switch to a different function. I was thinking of using 1/0 to designate which is true or not, but not sure if that'd be the most efficient way. Still very new to coding, and autoit, any help would be great!
  9. No, I never received that message.
  10. Can be closed. Figured it out.
  11. I have ran into some issues with image search. Every time I run the script, it never finds the image in the browser, but if I open the image directly on the desktop, it'll find it no problem. Why is this? Any way around it?  Func ImageSearchFarm ()      Local $picture = 'C:\Users\Jammmesss\Desktop\AutoIt\New folder\Icon.png'      Local $x1 = 0      Local $y1 = 0      Do          $result = _ImageSearch($picture,1,$x1,$y1,0,0)          ConsoleWrite ($result)      until $result = 1;      if $result=1 Then          MouseMove($x1,$y1,50)      else          MsgBox (0,'MSG','End') EndIf      EndFunc
  12. Ahh, sent that premature, lmao.
  13. fghdg <form id="login_form" action="#" method="post"> <input type="submit" class="submit" id="login_submit_button"> <label for="user"> <input id="user" name="username" type="text" value=""> <span>User name:</span> </label> <label for="password"> <input name="clear" type="hidden" value="true"> <input id="password" name="password" type="password"> <span>Password:</span> </label> <label for="remember-me" class="remember_me"> <span class="remember-me">Remember me</span> <input id="remember-me" type="checkbox" name="remember-me" > </label> <div class="login-buttons"> <a class="login-facebook" href="https://ipp-facebook.******.de/?game=*****e&******t=en&ref=start&"></a> <div class="button small"><a class="btn-login" href="#">Login</a></div> </div> </form>
  14. All that is happening is that it's activating the window, but not actually clicking anything.
  15. Thanks for the tip. Just attempted to call this function, with no luck. Any ideas? Func logBtn () Local $oInputs = _IETagNameGetCollection($ie, "div") For $oInput In $oInputs     If $oInput.classname == "btn-login" Then _IEAction($oInput, "click") Next EndFunc
×
×
  • Create New...