Berend Jan Posted April 7, 2005 Share Posted April 7, 2005 hi guys, Im trying to select some text. then put it into a variable so i can check it and run the one or the other code. could you guys check it and say what i am doing wrong. I could be all wrong, im still a big n00b with this :"> This is what i got untill now: MouseClick ("left", 33, 154, 2) $Land = Send ("^c") If $Land = "Verenigde " Then MouseClick ("left", 779, 240, 2) Send ("^c") Mouseclick ("left", 507, 429, 1) Send ("^v") Mouseclick ("left", 483, 484, 1) MouseClick ("left", 808, 481, 1) ElseIf $Land = "Italie" Then SplashTextOn ("bla", "bla", 100, 100, 900, 100) EndIf Link to comment Share on other sites More sharing options...
Ejoc Posted April 7, 2005 Share Posted April 7, 2005 quick glance: Send("^c") $Land = ClipGet() Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs Link to comment Share on other sites More sharing options...
Berend Jan Posted April 7, 2005 Author Share Posted April 7, 2005 quick glance:Send("^c")$Land = ClipGet()<{POST_SNAPBACK}>apparently he doesn't get the copy command right because he's showing what i already had under ctrl c. Is there a other way to put in the clipboard? Link to comment Share on other sites More sharing options...
Berend Jan Posted April 8, 2005 Author Share Posted April 8, 2005 does anybody have a suggestion to my problem? BJ Link to comment Share on other sites More sharing options...
Developers Jos Posted April 8, 2005 Developers Share Posted April 8, 2005 does anybody have a suggestion to my problem?BJ<{POST_SNAPBACK}>try putting a sleep between the mouseclick and the ^c ... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
MHz Posted April 8, 2005 Share Posted April 8, 2005 $Land = Send ("^c")Send() does not return a value, so this attempt will fail.Or maybe not? Link to comment Share on other sites More sharing options...
Berend Jan Posted April 8, 2005 Author Share Posted April 8, 2005 Send() does not return a value, so this attempt will fail.Or maybe not? <{POST_SNAPBACK}>i already adapted that to $Land = ClipGet() and i'll try the sleep between the 2 lines. Link to comment Share on other sites More sharing options...
Berend Jan Posted April 8, 2005 Author Share Posted April 8, 2005 try putting a sleep between the mouseclick and the ^c ...<{POST_SNAPBACK}>no this doesn't work either. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 8, 2005 Developers Share Posted April 8, 2005 no this doesn't work either. <{POST_SNAPBACK}>can you specify how you are testing so we can try it out ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Berend Jan Posted April 8, 2005 Author Share Posted April 8, 2005 can you specify how you are testing so we can try it out ?<{POST_SNAPBACK}>yeah sure. i let the mouse click on a certain word. the word that should be shown in the msgbox later on. but it still shows something else that i copy and pasted earlier. sleep (2000) MouseClick ("left", 33, 154, 2) sleep (500) Send ("^c") $Land = ClipGet() MsgBox(0, "Clipboard contains:", $Land) Link to comment Share on other sites More sharing options...
Developers Jos Posted April 8, 2005 Developers Share Posted April 8, 2005 yeah sure. i let the mouse click on a certain word. the word that should be shown in the msgbox later on. but it still shows something else that i copy and pasted earlier. sleep (2000) MouseClick ("left", 33, 154, 2) sleep (500) Send ("^c") $Land = ClipGet() MsgBox(0, "Clipboard contains:", $Land)<{POST_SNAPBACK}>Understand this part, but what (dutch/nederlandse) application are you using that you want to select something of ? Its easiest to try it the same way as you are doing.... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Ejoc Posted April 8, 2005 Share Posted April 8, 2005 (edited) are you highlighting the word? If I click on ----> THIS once and hit CTRL-C nothing happens, but if I double-click it CTRL-C puts it in the clipboard. *EDIT I see now that you are trying to double click, but is it working? Is the word highlighted? Can you copy words to the clipboard manually? Edited April 8, 2005 by Ejoc Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs Link to comment Share on other sites More sharing options...
Berend Jan Posted April 8, 2005 Author Share Posted April 8, 2005 Understand this part, but what (dutch/nederlandse) application are you using that you want to select something of ? Its easiest to try it the same way as you are doing....<{POST_SNAPBACK}>im trying to detect in which country i am in a small internet game. just trying out some stuff. so im just trying to copy that word onto the clipboard so i can put it in a variable to start doing the next action on that. im doing it in Mozilla Firefox.i can also explain in dutch if you like. Link to comment Share on other sites More sharing options...
Ejoc Posted April 8, 2005 Share Posted April 8, 2005 sleep (2000) MouseClick ("left", 733, 656, 2) sleep (500) Send ("^c") $Land = ClipGet() MsgBox(0, "Clipboard contains:", $Land) Worked perfectly in Firefox for me Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs Link to comment Share on other sites More sharing options...
Berend Jan Posted April 8, 2005 Author Share Posted April 8, 2005 are you highlighting the word? If I click on ----> THIS once and hit CTRL-C nothing happens, but if I double-click it CTRL-C puts it in the clipboard.*EDIT I see now that you are trying to double click, but is it working? Is the word highlighted? Can you copy words to the clipboard manually?<{POST_SNAPBACK}>yes it's highlighted. and i can copy it manually as well. Link to comment Share on other sites More sharing options...
Berend Jan Posted April 8, 2005 Author Share Posted April 8, 2005 sleep (2000) MouseClick ("left", 733, 656, 2) sleep (500) Send ("^c") $Land = ClipGet() MsgBox(0, "Clipboard contains:", $Land)Worked perfectly in Firefox for me<{POST_SNAPBACK}> why not for me. hmmzz... could it be anything on the website that's blocking it? Link to comment Share on other sites More sharing options...
Developers Jos Posted April 8, 2005 Developers Share Posted April 8, 2005 yes it's highlighted. and i can copy it manually as well.<{POST_SNAPBACK}>So the Double click selects the text you want but the Send("^c") doesn't put it into the clipboard. even when you put an Sleep(1000) between the 2 statements? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Ejoc Posted April 8, 2005 Share Posted April 8, 2005 Might want to look into using: ControlClick() ControlSend() WinActivate() Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs Link to comment Share on other sites More sharing options...
Berend Jan Posted April 8, 2005 Author Share Posted April 8, 2005 So the Double click selects the text you want but the Send("^c") doesn't put it into the clipboard. even when you put an Sleep(1000) between the 2 statements?<{POST_SNAPBACK}>yes that is correct. the send ("^c") doesnt put it into the clipboard. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 8, 2005 Developers Share Posted April 8, 2005 yes that is correct. the send ("^c") doesnt put it into the clipboard.<{POST_SNAPBACK}>It could be the game blocking it ?what about Send("^{Insert}") ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now