polandSPP Posted October 26, 2008 Share Posted October 26, 2008 (edited) Ok, I am a total newbie at coding with anything(Maybe HTML but who doesnt know that). Anyways I never learned it. I am trying to accomplish a very basic simple bot. I thought it would be simple since I was emulating only a few mouseclicks and keypresses. I read up on the faqs and it made my mind go into a complete Here's the scenario, I want to make the script standby when opened and will run right away when I press a shortcut like CONTRL+ I want to be copy text from 'tab1' of firefox and paste it into 'tab2' of firefox. Here's what I have so far. ; TO RUN USE A SHORTCUT KEY ; LOCATE ("firefox.exe") WinWaitActive("Weight of the World On Both Shoulders - Mozilla Firefox") Sleep(3000) ; RUN A MACRO SHORTCUT FOR EVERYTHING BELOW MouseClick("left", 130, 125, 1, 1) Sleep(1000) MouseClick("left", 500, 500, 2, 1) Send("CTRL"+"c") Sleep(1000) ; I could not get anything to work after this. Send("CTRL"+"TAB") Sleep(1000) Send("CTRL"+"v") Sleep(1000) Send("Enter") Exit Basically I rewritten the script a few dozen times with my limited knowledge but to no avail. I could not get Control+tab(or #2 for window#2) to work. By then I opted for MouseClick "left, yada yada yada", which worked. Then I couldn't get it to paste from the clipboard. I tried to understand how to retrieve data from clipboard and paste it but I'd rather it just simulate the keys to paste it. My script also did not simulate the enter key either. And I havn't found anything on RUN on keypress/command yet for the script so I'll leave that optional for now but would like help on that too. Edited October 26, 2008 by polandSPP Link to comment Share on other sites More sharing options...
cparadis Posted October 26, 2008 Share Posted October 26, 2008 (edited) It seems like you forgot { }, like Send("{Enter}") have you readed the readme? clipget() i think and use a loop to get all from it. And you can use "_ClipBoard_GetData " to i think. Im actually new, but i have readed little about it. Here you have for copy. Send("^c"}, '^' stands for Control/CTRL Use the "AutoIt Window Info" to get the info from the editbar. Edited October 26, 2008 by cparadis Link to comment Share on other sites More sharing options...
cparadis Posted October 26, 2008 Share Posted October 26, 2008 Can't edit my post. But i think you need to use "_IEFormElementSetValue" and thing to get it work best. Link to comment Share on other sites More sharing options...
polandSPP Posted October 27, 2008 Author Share Posted October 27, 2008 Never mind, I got the script to work. I have no idea why it didnt work yesterday with the pasting. I thought I wrote "{Enter}" before but changed it because it did not press enter. Maybe I was too sleepy to notice it actually worked. Anyway thanks cpara. I still need help with setting it to run on command. Like it will standby. I tried to write something for it but got completely confused after like 2 lines. More like I do not know where to start. Link to comment Share on other sites More sharing options...
polandSPP Posted October 27, 2008 Author Share Posted October 27, 2008 never mind guys i got everything to work. may not be the prettiest of codes but its working =D thanks guys. 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