
Franz135
Members-
Posts
18 -
Joined
-
Last visited
Everything posted by Franz135
-
Which value did you set? I am not sure which number represents the number of attempts. 500, correct? Edit: And where did you set the 1 sec sleep at each iteration? How would I set 2 sec sleep for example?
-
Two other questions: 1) How can I set a time like 8h45? Is this correct? While Int(@HOUR) < 8.45 2) When will the program stop if it doesnt find a reservation (how does it jump to "unable to make reservation")?
-
Thank you for your effort! I will definitely try this tomorrow.
-
Ok, I try to explain what I want to achieve: 1) I want to make a reservation on this website (https://pretix.eu/dnb/reservierung-f/). Everyday 9 AM tickets will be released. At this time the website looks like in the attached picture. To make the reservation I have to click on one of the boxes and then click on the "anmelden"-button. And I have to do it really fast because the tickets are gone in 1-2 seconds. => I want a program that automatically opens the website and does this steps at 9 AM. So far I have this (imo only the feature that the program starts itself at 9 AM is missing) #include <IE.au3> Call ("SignIn") Func SignIn () Global $oIE = _IECreate ("https://pretix.eu/dnb/reservierung-f") Local $button1 = _IEGetObjByName ($oIE,"item_66932") Local $button2 = _IEGetObjById ($oIE, "btn-add-to-cart") _IEAction ($button1,"click") Sleep(100) _IEAction ($button2,"click") EndFunc 2) If I didnt manage to get a ticket sometimes someone cancels its ticket. To make sure that I get this ticket (and not someone else) I have to click the refresh button constantly until a "free" box is shown again. Then I have to click on the box and the "anmelden"-button. So far I made a program that presses the refresh button every 4 seconds (just a bunch of mouse click commands) and I tried to make a program that quickly clicks on the box and the "anmelden"-button (the topic is about this program). The current problem I have is that I cannot switch very fast from the reload program to the second program and that the second problem is a little bit slower when it always has to restart the explorer. Why is the program in 1) and the program I posted at the beginning of the thread different? Because right now I manually refresh and then activate program with the down key (which does not work): #include <IE.au3> HotKeySet ( "{DOWN}","_start" ) HotKeySet ( "{UP}","_pause" ) HotKeySet ( "{END}","_exit" ) Global $go = 0 Global $oIE = _IECreate ("https://pretix.eu/dnb/reservierung-f") While(1) If($go) Then Local $button1 = _IEGetObjByName ($oIE,"item_66932") Local $button2 = _IEGetObjById ($oIE, "btn-add-to-cart") _IEAction ($button1,"click") Sleep(1) _IEAction ($button2,"click") $go=0 Else Sleep(1) EndIf WEnd Func _start() $go = 1 EndFunc Func _pause() $go = 0 EndFunc Func _exit() Exit EndFunc I appreciate any help!
-
@Nine @JLogan3o13 It is nearly similiar but instead of mouse clicks I want to use a more "intelligent" version (by using things like IEGetObjByName). But right now the programm restarts the explorer and the website. I want the programm to only click the two buttons while I am on the website. Any ideas?
-
Thanks. I put the following definition in: Global $oIE = _IECreate ("https://xxx") But when I do this the website opens (even if the website is already open). I dont want that the programm to restart the explorer and the website. I just want the programm to click two buttons (item_66029 and btn-add-to-cart) when I press the down key (while I am on the website).
-
Hello everyone, I want the programm to click two buttons (item_66029 and btn-add-to-cart) when I press the down key. It seems I do something wrong. Any ideas? Thanks for the help! #include <IE.au3> HotKeySet ( "{DOWN}","_start" ) HotKeySet ( "{UP}","_pause" ) HotKeySet ( "{END}","_exit" ) Global $go = 0 While(1) If($go) Then Local $button1 = _IEGetObjByName ($oIE,"item_66029") Local $button2 = _IEGetObjById ($oIE, "btn-add-to-cart") _IEAction ($button1,"click") Sleep(1) _IEAction ($button2,"click") $go=0 Else Sleep(1) EndIf WEnd Func _start() $go = 1 EndFunc Func _pause() $go = 0 EndFunc Func _exit() Exit EndFunc
-
Hello everyone, I want the program to run when I press the down key, to pause, when I press the up key and to exit, when I press the end key. But I only could manange that the program starts with the up key. What am I doing wrong? HotKeySet ( "{DOWN}","_start" ) HotKeySet ( "{UP}","_pause" ) HotKeySet ( "{END}","_exit" ) Global $go = 0 While(1) If($go) Then MouseClick("left",912,271,1,1) Sleep(20000) MouseClick("left",912,718,1,1) $go=0 Else Sleep(1) EndIf WEnd Func _start() $go = 1 EndFunc Func _pause() $go = 0 EndFunc Func _exit() Exit EndFunc
-
How to click on a website button (with no name)?
Franz135 replied to Franz135's topic in AutoIt General Help and Support
You are right, I didnt see it. Thanks! -
How to click on a website button (with no name)?
Franz135 replied to Franz135's topic in AutoIt General Help and Support
@water Because of corona it is only possible to go to the library if you get a ticket. Every day. So I have to fill out these tickets every day (twice) so that I can visit the library. I just want to save myself some work. -
How to click on a website button (with no name)?
Franz135 replied to Franz135's topic in AutoIt General Help and Support
Here the html (they seem pretty similiar): PS: How can I find an associated form? <input type="text" name="4384694-question_11864" class="form-control" placeholder="Vorname" title="" required="" id="id_4384694-question_11864"> <input type="text" name="4384694-question_11865" class="form-control" placeholder="Nachname" title="" required="" id="id_4384694-question_11865"> <input type="text" name="4384694-question_11683" class="form-control" placeholder="Benutzungsausweisnummer" title="" required="" id="id_4384694-question_11683"> <input type="text" name="4384694-question_11684" class="form-control" placeholder="Telefonnummer" title="" required="" id="id_4384694-question_11684"> all four togehter: <div class="panel-body questions-form" data-idx="0"> <div class="form-group required"><label class="col-md-3 control-label" for="id_4384694-question_11864">Vorname</label> <div class="col-md-9"><input type="text" name="4384694-question_11864" class="form-control" placeholder="Vorname" title="" required="" id="id_4384694-question_11864"></div></div> <div class="form-group required"><label class="col-md-3 control-label" for="id_4384694-question_11865">Nachname</label><div class="col-md-9"><input type="text" name="4384694-question_11865" class="form-control" placeholder="Nachname" title="" required="" id="id_4384694-question_11865"></div></div> <div class="form-group required"><label class="col-md-3 control-label" for="id_4384694-question_11683">Benutzungsausweisnummer</label><div class="col-md-9"><input type="text" name="4384694-question_11683" class="form-control" placeholder="Benutzungsausweisnummer" title="" required="" id="id_4384694-question_11683"></div></div> <div class="form-group required"><label class="col-md-3 control-label" for="id_4384694-question_11684">Telefonnummer</label><div class="col-md-9"><input type="text" name="4384694-question_11684" class="form-control" placeholder="Telefonnummer" title="" required="" id="id_4384694-question_11684"></div></div> </div> -
How to click on a website button (with no name)?
Franz135 replied to Franz135's topic in AutoIt General Help and Support
Hello again, I got another problem: on the next page I want to type something in the four boxes ("Vorname", "Nachname", Benutzungsausweisnummer", "Telefonnummer", see attached picture). But for all four of them I get the same (only the placeholder is different): <input name="4383716-question_11864" title="" class="form-control" id="id_4383716-question_11864" required="" type="text" placeholder="Vorname" data-dpmaxz-eid="3"> Any ideas how to start? -
How to click on a website button (with no name)?
Franz135 replied to Franz135's topic in AutoIt General Help and Support
Thanks, it worked! -
How to click on a website button (with no name)?
Franz135 replied to Franz135's topic in AutoIt General Help and Support
Thanks for the fast answer! Here the error: >"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\franz\Documents\AutoIT\Test2.au3" --> IE.au3 T3.0-2 Warning from function _IEGetObjByName, $_IESTATUS_NoMatch (Name: btn-add-to-cart.btn.btn-block.btn-primary.btn-lg, Index: 0) --> IE.au3 T3.0-2 Error from function _IEAction(click), $_IESTATUS_InvalidDataType >Exit code: 0 -
Hello everyone, I want to find the "name" of a button on a wesbite so I can make bot which clicks on the button. In Chrome I used the "inspect"-tool to find the name but all I got is this: <button class="btn btn-block btn-primary btn-lg" type="submit" id="btn-add-to-cart" data-original-title="" title=""> <i class="fa fa-check"></i> " Anmelden " </button> My Code so far (which didnt work): Global $oIE = _IECreate ("https:xxx") Local $button2 = _IEGetObjByName ($oIE,"btn-add-to-cart.btn.btn-block.btn-primary.btn-lg") _IEAction ($button2,"click") Can anyone help?
-
Start programm with down arrow key
Franz135 replied to Franz135's topic in AutoIt General Help and Support
@Nine The reason for the program is that I want to quickly reserve places on a website (library) that are taken after two seconds (see picture). I have some ideas how to make the programm better but I dont know how to implement them. I want the program to press the refresh button in my browser at 8:59:59 a.m. After loading the website, it should click on the empty box and the "anmelden" (register) button immediately. -
Start programm with down arrow key
Franz135 replied to Franz135's topic in AutoIt General Help and Support
@Sidley Thanks! -
Hello everybody, I created a simple AutoIT bot. The bot should simply click the mouse at two points defined by me. My problem: I want (after the program was started with F5) the commands to be activated with the down arrow key. How do I do this or what am I doing wrong? My previous code: HotKeySet ( "{DOWN}","_start" ) HotKeySet ( "{UP}","_pause" ) HotKeySet ( "{END}","_exit" ) Global $go = 0 Func _start() $go = 1 EndFunc Func _pause() $go = 0 EndFunc Func _exit() Exit EndFunc MouseClick("left",912,271,1,1) Sleep(10) MouseClick("left",912,718,1,1) Sleep(10) Thanks!