Jump to content
Sign in to follow this  
Energized

Newb need help =D

Recommended Posts

Energized

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
Generator

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
Energized

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
someone

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
Energized

nah thats not my whole script :)

@JdeB thanks ill try it

Share this post


Link to post
Share on other sites
Zedna

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
Energized

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
GMK

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

Share this post


Link to post
Share on other sites
Energized

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
BrettF

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  

×