spadacio

Script to copy test into a Windows application

2 posts in this topic

#1 ·  Posted (edited)

Hello
I would like to create a script that copy some words from a .txt file and paste it into a windows application. 
The text file looks like this 
aaaaa  1239123 asdadadsada ijffkde
dddd 232323 sdkdadsada  dasdasd
bdbdas 32323 njfan  ndnaenkda 

my script look like and I want to create a loop and also I will need a timer . 

 

Run('C:\Program Files (x86)\APP\api.exe')
_WinWaitActivate("API.exe)","")
MouseClick("left",396,86,1)
_WinWaitActivate("TEXT - Notepad","")
Send("{CTRLDOWN}")
MouseMove(186,58)
MouseDown("left")
MouseMove(13,60)
MouseUp("left")
Send("cc{CTRLUP}")
_WinWaitActivate("Add ","")
MouseMove(77,12)
MouseDown("left")
MouseMove(77,13)
MouseUp("left")
Send("{CTRLDOWN}")
MouseClick("left",134,53,1)
Send("v{CTRLUP}")
_WinWaitActivate("TEXT - Notepad","")
MouseMove(486,59)
MouseDown("left")
MouseMove(317,58)
MouseUp("left")
Send("{CTRLDOWN}cc{CTRLUP}")
_WinWaitActivate("Add Server","")
MouseClick("left",180,181,1)
Send("{CTRLDOWN}")
MouseMove(196,179)
MouseDown("left")
MouseMove(84,177)
MouseUp("left")
Send("v{CTRLUP}")
_WinWaitActivate("TEXT - Notepad","")
MouseMove(531,57)
MouseDown("left")
MouseMove(531,58)
MouseUp("left")
MouseMove(531,60)
MouseDown("left")
MouseMove(531,59)
MouseUp("left")
MouseMove(564,52)
MouseDown("left")
MouseMove(500,55)
MouseUp("left")
Send("{CTRLDOWN}cc{CTRLUP}")



Thanks for your time 

Edited by Jos
Added codebox

Share this post


Link to post
Share on other sites



You could probably cut a lot of lines if you could get the application control id's.

Where's the "file reading part" on your script? check fileopen and filereadtoarray functions.

You didn't specify the relation of the txt file with the script, where is the content of the file supposed to go?


Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

 

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