Sign in to follow this  
Followers 0
ajcrewmisfit

MouseClick in a dynamic environment

8 posts in this topic

Hello,

I asked a question before and it seems like these forums are pretty active so here goes another!

Basically i have a script that is going ot install 3 separate software packages. I can deal with different monitor resolutions, but sometimes people have their icons set up differently. In this particular problem i can't get to folders/files using the keyboard, sucks =P. I was just wondering if anyone has thought of a better way to deal with different settings when it comes to files and folders

for example...

1) some people may have hidden files

2) some people may have their toolbars ordered differently

3) some people have different window sizes for things like Windows Explorer and Internet Explorer

4) some people have big icons, little icons, and even thumbnails

Am i wrong about AutoIt not really being able to handle this?


------------------------------------------------------------------If it were up to me, all computer stuff would work

Share this post


Link to post
Share on other sites



Strictly dealing with a mouseclick, all you could do would be to use pixel functions to detect a region to click. If you can use a ControlClick, send keys to windows, or use command line switches for programs, you can make a dynamic script much more eaisily. The Control* functions are designed to give you a way to directally interact with windows and controls within the windows without the need to use a mouse.

Also, with your mention of directories and files, have you taken a look at the DOS dir command? It has a ton of switches to display directories, hidden, protected, and other types of files. Just a place to start if you need a readout of some directories or files.


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

Share this post


Link to post
Share on other sites

well, it all depends on what you're trying to do. if you're trying to click a button, try controlclick or controlsend... I almost never send regular mouse clicks or keys anymore (this is actually one of the ways I've a difference between old scripts and new ones), I use controlclick or controlsend...

1) some people may have hidden files

2) some people may have their toolbars ordered differently

3) some people have different window sizes for things like Windows Explorer and Internet Explorer

4) some people have big icons, little icons, and even thumbnails

1) I don't think autoit's internal commands like filedelete have any issues with hidden files...

2) just don't do things by clicking on the toolbars, do them differently... what toolbar are you wanting to click on?

3) yeah, see the above... what are you trying to do within these? clicking links can be tough, but URLDownloadToFile can download things that you can run, if that's your aim...

4) big icons, little icons, who cares... it's all about thinking outside the box...

if you post some more specific problems, we can help...


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

hmmm .... i'll look into the control* functionality.

as far as those examples went (1-4), i dont necessarily have a problem with toolbars or anything i am just trying to get possible "future questions" answered.

you said think outside of the box... i kind of am! i'm just not that good at it yet when it comes to AutoIt. I've never done any scripting until the past week!! lol!!

Well, thanks a ton these are very helpful =)


------------------------------------------------------------------If it were up to me, all computer stuff would work

Share this post


Link to post
Share on other sites

well, welcome to the wonderful world of scripting... in no time you too will be waking up in the middle of the night with coding solutions...

Don't worry so much about the big project, do some small stuff, that'll get you used to functions and variables and all that good stuff.

I don't know if people believe me, but I actually printed out the first half of the helpfile, just about everything up to the functions (that was 300+ pages, I don't reccomend that :ph34r: ) and read it... the evening bus ride was good for that... it helps to have that stuff in the back of your head, even if you don't use it all right off the bat.


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

i dont necessarily have a problem with toolbars or anything i am just trying to get possible "future questions" answered.

Pretty much anything that you can do with a mouse you can also do with the keyboard or the command-line. Instead of clicking on the file menu (which could change position depending on themes and other variables) you can send Alt-f or find the control. This is true for almost everything you could think of on a computer. The Control* functions let you send keystrokes, mouseclicks, and even text to parts of windows, even if they are minimized or hidden.

Take a look at those functions in the helpfile and I think it'll make a lot more sense to you. If not, try posting about a specific problem so that we can give you an example of how you can utilize the functions once you've read about them.


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

Share this post


Link to post
Share on other sites

hahahahahahahahaha

i actually did a little printing... only about 20 pages though... function reference and macro reference... are there any other references i could print?


------------------------------------------------------------------If it were up to me, all computer stuff would work

Share this post


Link to post
Share on other sites

well, I did the whole using autoit part, and the macro reference shortly afterwards...

the Language reference is really handy, as someone who'd had some bat file and autoit 2.x years ago, and not much other programing experiance, it helped me pull together what all the if...then and for ... next and functions stuff..


"I'm not even supposed to be here today!" -Dante (Hicks)

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