Jump to content

script doesn't run when I change the screen-resolution


 Share

Recommended Posts

Hello,

to learn more about AutoIt, I started with a quick look at the documentation. To save time, I tried the au3record and it works. :-)

But if I change the position of one icon on the desktop or I change the screen-resolution the script doesn't work. It depends on the mouse-movements, because it could not select the icons. Do I have a chance to modify the script in a way that is work independed from the screen-resolution? Or I have to write the script new from the beginning by myself?

many thanks in advance

skyteddy

Link to comment
Share on other sites

Hello,

to learn more about AutoIt, I started with a quick look at the documentation. To save time, I tried the au3record and it works. :-)

But if I change the position of one icon on the desktop or I change the screen-resolution the script doesn't work. It depends on the mouse-movements, because it could not select the icons. Do I have a chance to modify the script in a way that is work independed from the screen-resolution? Or I have to write the script new from the beginning by myself?

many thanks in advance

skyteddy

If it's a recorded script and you change the resolution then the only answer would be to create 2 scripts for each resolution and combine them, then make your prog detect the resolution and choose the appropriate recording. Or you can make it more flexible by learning more about AutoIt and searching the forum as well as reading the help file - online documentation works great as well.
Live and Learn, 'cause Knowledge is Super Power.
Link to comment
Share on other sites

As a fellow newby I can only say try to avoid using the recorder. For instance if you want to open a program on the desktop you could use the Run()command, then use send() commands to manipulate your windows. The helpfile and forums will get you a long way.

Cheers daashag

Link to comment
Share on other sites

Don't use the recorder. The recorder is good if you want to get something done quick and dirty, but it won't be very compatable and will have lots of little problems. The best way to automate things is to hard code the automation yourself into the script. Look in the help file for the following commands. With them you can get autoit to click the correct button or control all the time.

ControlClick()

ControlSend()

ControlSetText()

ControlCommand()

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Link to comment
Share on other sites

Thanks all for the replys. You give me th courage to start it by myself!

I started writing my first scripts without the recorder! And my first software-installscripts works, but I have a lot of question where I didn't found a help in the documentation or in the examples or in the faq.

- In a windows with a lot of checkboxes I select and deselect the boxes with Send ( "{DOWN}") and Send ( "{SPACE}"). What ist the better way to handle it?

- How can I check if a software is allready installed? At the moment I check it via FileExists(...) the program-path.

- How can I deinstall a installed software if there have no uninstall.exe in the menu.

- How can I replace the standard windows Quick Launch Bar with the FreeLaunchBar (http://www.freelaunchbar.com)?

First I have to install the software. This is easy now :-) But how can I handle the deselction of the standard Launch bar and aktivate the FreeLaunchbar in the Symbollists. (In German it called "Symbolleisten", I don't know the correct english word. Sorry).

many thanks!

sunny greetings from germany!

skyteddy

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