Jump to content

Recommended Posts

Posted (edited)

Title is pretty misleading...but Ill try to explain the best I can!

Im new to coding so please forgive me if I make mistakes!

I have 40 different sets of phrases...

I have them setup like

$1 = Phrase 1

...

...

$40 = Phrase 40

I want these phrases to be put in a textbox which I have the coordinates for:

Sleep(10000)
MouseClick("Right",350,237)
Sleep(100)


Send($1 ,1)
Send({ENTER})

Then it sleeps, clicks somewhere else, then sleeps:

Sleep(7000)
MouseClick("Right",60,125)
Sleep(10000)

Then I want it to click on the textbox and insert the second phrase...however, I would like to know an effecient way to do this besides copying and pasting the code 40 times over. If I can recall, I think an array would be the correct thing im looking for but I honestly dont know :)

Any help would be appreciated, thanks in advance!!

P.S. A Gui would be awesome! If I could gui it so that I could change the phrase, $1 - $40, through a Gui that would be so cool...how would I go about doing this?

Edited by Cornflake
Posted

Hi,

I'll try to help you !!

You could use an array

Dim $Myarray[41]
$Myarray[1] = "phrase 1"
....
$My Arry[30] = "phrase 30"
...
$My Array[40] = "phrase 40"

then a loop

for $i = 1 to 40

Sleep(10000)
MouseClick("Right",350,237)
Sleep(100)
Send(Myarray[$i] ,1)
Send({ENTER})
Sleep(7000)
MouseClick("Right",60,125)
Sleep(10000)

Next

Hope this help

We could also use a file from wich read each phrase (refer to FileReadLine )

Regarding the GUI concept, i don't understand the purpose of your script, thus i can't help

Xavier

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...