Sign in to follow this  
Followers 0
Energized

Newb need help =D

12 posts in this topic

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

Share this post


Link to post
Share on other sites



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

ClipPut(), ClipGet()

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by Energized

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

nah thats not my whole script :)

@JdeB thanks ill try it

Share this post


Link to post
Share on other sites

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!!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

From where are you getting (i.e., copying) the text?

Share this post


Link to post
Share on other sites

i put an GUICtrlCreateEdit at first, but now i tried opening a notepad..still wont work o.o

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0