Just need some help with a GUI, not very experienced with them. I will paste the script below. I have made a bot that gets me stuff from a website in under 4 seconds, assuming the address has been saved, it is very useful as when the website drops hyped items, I can buy them fast. Basically I want an input box where you can enter card number, security code and expiration date. The card number and security code are what I assume to be quite easy as the variables are stated at the start of the script and can be altered. However, the arrangement I have with the expiry date is more relative to the website. obviously on most websites you enter expiry date from a drop down menu. The site I have programmed for uses a drop down menu also, however the current month and year is what it is automatically set too. For example the month now is may (5) and 2018, if my expiry date was October (10) and 2019, the arrangement would be:
Code: Select all
send {tab}
send {enter}
send {down 5}
send {enter}
Code: Select all
sleep, 5
send {tab}
send {enter}
send {down 1}
send {enter}
This means I have to update the bot every month, decreasing the amount the highlighted box needs to move.
I thought of using image search instead, so it finds the "10" in the drop down, however when it gets to October 2018, the image search will not be carried out as the image it is looking for will have changed colour. Also I assume it makes it harder for the GUI to change the expiration date as you would need a collection of pictures and a way of getting around the highlighted month that changes monthly.
Overall, I would love help for these things:
1. Creating an input box for the card number, along with some sort of enter box, that submits it into the code.
2. the same box and button, except for a 3 digit security code
3. A drop down menu for the month and year that somehow correlates to the code which selects the drop down menu on the site
4. A way of selecting the information on the drop down menu for the site, that would not have to be changed monthly but does not compromise the GUI
any help is greatly appreciated
If anyone is wondering, the website is supremenewyork.com
----------------------------
Code: Select all
#SingleInstance, Force
Gui, -AlwaysOnTop
Gui, Font, s10, courier
Gui, Add, Text, x10 y10, The First Truly Untraceable Supreme Bot
Gui, Add, Button, x100 y300 w300 h30 gSupreme_Bot, Let's Cook
Gui, Color, white
Gui, Show, w500 h500, Supreme Bot - By Ben Danziger
return
GuiClose:
ExitApp
Return
Supreme_Bot:
credit_card := "1234 5678 1234 5678"
credit_card_pin := "123"
SetWorkingDir %A_ScriptDir%
SetWorkingDir, ?C:\Users\bdanz\Documents\AHK
coordmode, mouse, screen
coordmode, pixel, screen
while(FoundX_1 == null)
{
ImageSearch, FoundX_1, FoundY, 0,380, 1905, 920, ?C:\Users\bdanz\Documents\AHK\addtobasket.png
ImageSearch, FoundX_1, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, %A_MyDocuments%\AHK\addtobasket.png
}
mousemove, %FoundX_1%, %FoundY%
click
sleep, 150
while(FoundX_2 == null)
{
ImageSearch, FoundX_2, FoundY, 473, 463, 620, 493, ?C:\Users\bdanz\Documents\AHK\checkoutnow.png
ImageSearch, FoundX_2, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, %A_MyDocuments%\AHK\checkoutnow.png
}
mousemove, %FoundX_2%, %FoundY%
click
sleep, 3000
while(FoundX_3 == null)
{
ImageSearch, FoundX_3, FoundY, 473, 463, 620, 493, ?C:\Users\bdanz\Documents\AHK\cardnumber.png
ImageSearch, FoundX_3, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, %A_MyDocuments%\AHK\cardnumber.png
}
mousemove, %FoundX_3%, %FoundY%
click
send, %credit_card%
sleep, 5
send {tab}
send {enter}
send {down 5}
send {enter}
sleep, 5
send {tab}
send {enter}
send {down 1}
send {enter}
sleep, 10
send {tab}
send, %credit_card_pin%
while(FoundX_4 == null)
{
ImageSearch, FoundX_4, FoundY, 0, 678, 1918, 1045, C:\Users\bdanz\Documents\AHK\terms.png
ImageSearch, FoundX_4, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, %A_MyDocuments%\AHK\terms.png
}
mousemove, %FoundX_4%, %FoundY%
Click
sleep, 10
while(FoundX_5 == null)
{
ImageSearch, FoundX_5, FoundY, 950, 775, 1918, 1045, ?C:\Users\bdanz\Documents\AHK\processpayment.png
ImageSearch, FoundX_5, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, %A_MyDocuments%\AHK\processpayment.png
}
mousemove, %FoundX_5%, %FoundY%
Click
Reload
return
escape::ExitApp