Jump to content

A few Questions


Cyote101
 Share

Recommended Posts

Hello, I'm new to the board and new to programing.

I was up till 3:00 last night getting used to this and i have a few questions.

I want to make a script that will do the fallowing,

1.Select the Window "TPS REPORT"

For this I can Use "WinActivate("TPS REPORT")" I Think as the Application will already be running

2. move the cursor to anypart of the window with a specific color in it (I could use some help on this )

3.Right Click from their (MouseClick("Right", $Coords[0], $Coords[1], 1, 0) ; Click on the position found, I Think)

4.I then want the arrow keys on the keyboard to go down 4 times and the Enter key pushed ( This is to go through the Right Click Menu Options and Print the Document)

5. At this point a Print Window will come up I would like the p button Pushed

I was looking for a recorder or something like that but could not find one. any help on this would be GREAT!

Thanks,

Also

Link to comment
Share on other sites

You'r on the right track :)

WinActivate("TPS REPORT","")

Then after window is active its time to get position offset.

$wpos = WinGetPos ("TPS REPORT", "")

You should now combine thse data with PixelSearch()

PixelSearch($left,$top,$right,$bottom,$color,$shade)
If Not @error Then
  Send("down")
  Sleep(25)
;.... add those extra send here...
Endif

Iwe written a pixelsearch helper witch could come inn handy if you dont quite understand how to use PixelSearch() Link inn sign.

This actually gave me the idea to uppdate it to use window offsets, if you still are having problems with this later, i shuld have uppdated my tool to add window offsets.

Edited by jokke
UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt.
Link to comment
Share on other sites

Okay, Thanks, Now I have another Question. On my sceen these setting would work, I have a widescreen monitor 1600X 1024 okay but what would happen if i run the code on a machine with lets say 600X800 scean I might go outside the range right.

So is there anyway I can make the search area just the active window. So no matter what size or Rez It would always work.

And another question

How do I script keyboard commands like left arrow and the enter button.

Thanks

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...