Jump to content

Running minimized


Recommended Posts

i know that the chances that it can do this are probably really slim, but is it possible to script autoit to target one program only, and just simulate the keystroke and mouse clicks in that program? therefore allowing you to minimize it and do something else at the same time? i know that this is possible through other methods, but i don't even know what those are.

[quote]If whenever you feel small, useless, offended, depressed, and just generally upset always remember......you were once the fastest and most vicious sperm out of hundreds of millions![/quote]

Link to comment
Share on other sites

Ooooooh, so that's what that does, i never really understood what it did. Thankx a lot man. :ph34r:

::Edit3:: errr... i went through it all, and i understand most of it, but i can't seem to get the Control Click part, since there's no Control command to let me determine the co-ordinates...

Edited by Faleira

[quote]If whenever you feel small, useless, offended, depressed, and just generally upset always remember......you were once the fastest and most vicious sperm out of hundreds of millions![/quote]

Link to comment
Share on other sites

  • Developers

it is a control command ... so you do not need coordinates where to click but the name of the control you want to click...

Control names can be found by using the au3_spy program ....

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

well, i'm trying to do this with I.E. and besides the menu tools on the top,and the status bar on the bottom, it just says the exact same thing for everything else... is there anyway through this?

[quote]If whenever you feel small, useless, offended, depressed, and just generally upset always remember......you were once the fastest and most vicious sperm out of hundreds of millions![/quote]

Link to comment
Share on other sites

  • Developers

well, i'm trying to do this with I.E. and besides the menu tools on the top,and the status bar on the bottom,  it just says the exact same thing for everything else... is there anyway through this?

If it doesn't have a controlname, you won't be able to use the ControlClick.

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

If you want to automate something with web pages, I would suggest one of two approaches:

Method 1: Download the html or php or whatever the page is and parse it manually. You can save it to a file with the UrlDownloadToFile function.

Method 2: Use Firefox that can find URL's simply by starting to type them. This makes automation a lot eaisier if you need to navigate a web page. You can control send to the "main" control part of the app, and it will find links that start with what you have typed. Combined with the status bar indication of "link not found" when Firefox is unable to find your link, it becomes a pretty powerful automation tool.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
Share on other sites

i understand the second one, because i use firefox as my primary web browser, but i didn't want to automate it on firefox, because it's set on opening tabs, and i didn't wanna bother with seeing if i could only have it automate in one tab.

as for the first method, i don't really understand what u mean by parse it manually...

[quote]If whenever you feel small, useless, offended, depressed, and just generally upset always remember......you were once the fastest and most vicious sperm out of hundreds of millions![/quote]

Link to comment
Share on other sites

as for the first method, i don't really understand what u mean by parse it manually...

Once you have the HTML or php source, you open it using a FileOpen and FileReadLine calls. You can read in URL's, text, or whatever else you need. It's a bit more work, but that way you don't need to depend on keystrokes to a browser to do your work.

As for the tabs, you can always open a link in a new tab with a Control+Enter keystroke, close them with Control+w, make a new one with Control+t, move to the next tab with Control+Tab, and go to previous with Control+Shift+Tab.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
Share on other sites

sorry, but could u explain a little more about the fileopen and filereadlines thing? i'm still a little lost on that...

[quote]If whenever you feel small, useless, offended, depressed, and just generally upset always remember......you were once the fastest and most vicious sperm out of hundreds of millions![/quote]

Link to comment
Share on other sites

sorry, but could u explain a little more about the fileopen and filereadlines thing? i'm still a little lost on that...

A FileOpen call will give you a file pointer so that you can read or write lines using the pointer. This is much faster than reading the file without a pointer, so it is probably a better way to read or write files than using only a FileRead of FileReadLine call. It also locks the file for read or write, and this insures that once we have a valid file pointer that the file won't be deleted or locked by another application.

You can use FileReadLine to read in a line at a time and store it to a variable, array, or test it right there. You can also use the _FileReadToArray UDF, which does a similar task.

Below I've combined these 2 functions with commented code to show you how to read a textfile called "input.txt" into an array that your script could use:

$file = FileOpen("input.txt", 0);open the file for reading
If $file = -1 Then;FileOpen will return -1 if there was a file open error
  MsgBox(16, "Error", "Error opening input.txt file. Make sure it exists.")
  Exit
EndIf
;now we know the file exists and is opened for reading
;we can create an array and read lines into the array now
$lineNumber = 1;set the line counter so we know what line we are on
While 1;infinate loop to read the lines one by one
  $line = FileReadLine($file, $lineNumber);get the next line of the file
  If @error = -1 Then ExitLoop;if the End Of File is reached, exit the loop
  ReDim $lineArray[$lineNumber];create or expand the array for our next line
  $lineArray[$lineNumber - 1] = $line;store the line to the next array element
   ;minus 1 because the last index is one less than the number of dimentions
WEnd
FileClose($file);release the file lock on our input file
;done.  we now have an array that holds each line of the file

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
Share on other sites

oooh, okay, so basically, it opens a file, and reads off of it to be used however you want in a script... i was pretty confused as to what it didm and the other part of it was i was confusedo n how it would fit in to the part of automating with the window hidden...

[quote]If whenever you feel small, useless, offended, depressed, and just generally upset always remember......you were once the fastest and most vicious sperm out of hundreds of millions![/quote]

Link to comment
Share on other sites

i was confusedo n how it would fit in to the part of automating with the window hidden...

It just depends on what you need to automate. If you need to get some URL's and visit them, you might be able to simply continue using UrlDownloadToFile to get new source and parse it as required. If you actually needed to click or send text to fields on a website, this method probably wonldn't work for you. I'm just trying to show how you could get information off of a page from a source file.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
Share on other sites

so basically, what i can do with this method, is download the source, open it up, search up the urls, and find the url bar control, and then have it send it in, right?

if that's so, then it's sort of like what i want, except what i'm tying to do it for, is basically, just link hopping, but it's in a php site, so, when i try to manually enter url's, it just sends me to the homepage...

[quote]If whenever you feel small, useless, offended, depressed, and just generally upset always remember......you were once the fastest and most vicious sperm out of hundreds of millions![/quote]

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