Energized Posted April 27, 2007 Share Posted April 27, 2007 Well i'm trying to make a macro that will "Ctrl+C" some text and will "Ctrl+V" it somewhere else. I've added a GuiCtrlCreateEdit, so I will be able to put the text there. The problem is, that even when i select the text, it wont ctrl+c it. can anyone comeup with an idea? -Ene Link to comment Share on other sites More sharing options...
Zedna Posted April 27, 2007 Share Posted April 27, 2007 Post your code. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Generator Posted April 27, 2007 Share Posted April 27, 2007 Well i'm trying to make a macro that will "Ctrl+C" some text and will "Ctrl+V" it somewhere else.I've added a GuiCtrlCreateEdit, so I will be able to put the text there.The problem is, that even when i select the text, it wont ctrl+c it.can anyone comeup with an idea?-EneClipPut(), ClipGet() Link to comment Share on other sites More sharing options...
Energized Posted April 27, 2007 Author Share Posted April 27, 2007 (edited) Well this is my code so far GUICreate("GUI") GUICtrlCreateEdit("write a sentence ",0,0) $ButtonOk=GUICtrlCreateButton("Ok",200,0,50,50) guisetstate() $msg = GUIGetMsg() if $msg = $ButtonOk Then Send("{LCTRL down}") Send("{c}") Send("{LCTRL up}") EndIf in that part i wanted it to ctrl+c but it wouldnt =x Edited April 27, 2007 by Energized Link to comment Share on other sites More sharing options...
someone Posted April 27, 2007 Share Posted April 27, 2007 Thats not your whole code right? You need a While/Wend loop with a gui else the script won't do anything. Instead of your send commands use Send("^c") the ^ is ctrl. While ProcessExists('Andrews bad day.exe') BlockInput(1) SoundPlay('Music.wav') SoundSetWaveVolume('Louder') WEnd Link to comment Share on other sites More sharing options...
Developers Jos Posted April 27, 2007 Developers Share Posted April 27, 2007 Send("^c") ; sends Ctrl+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...
Energized Posted April 27, 2007 Author Share Posted April 27, 2007 nah thats not my whole script @JdeB thanks ill try it Link to comment Share on other sites More sharing options...
Zedna Posted April 27, 2007 Share Posted April 27, 2007 Before Send("^c") you must use WinActivate() to your desired window because Send() send keystrokes to active window. In your script your GUI will be active after click on your button so Send() will send it to your window!! Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Energized Posted April 27, 2007 Author Share Posted April 27, 2007 Im having a hard time solving this code (my first script in autoit >.>) could anyone try and make an example for me? like a script that copy and paste it to another place? thanks in advance. Link to comment Share on other sites More sharing options...
GMK Posted April 27, 2007 Share Posted April 27, 2007 From where are you getting (i.e., copying) the text? Link to comment Share on other sites More sharing options...
Energized Posted April 27, 2007 Author Share Posted April 27, 2007 i put an GUICtrlCreateEdit at first, but now i tried opening a notepad..still wont work o.o Link to comment Share on other sites More sharing options...
BrettF Posted April 27, 2007 Share Posted April 27, 2007 Like GMK said, from where is the source of the text?? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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