Jump to content

Recommended Posts

Posted

hi.

i was a time ago when i was using autoit and now i need som help when i want my script to open google chrom. this is how my scrips looks now.

Run(@WindowsDir & "C:\Users\Mattias\AppData\Local\Google\Chrome\Application\chrome.exe","",@SW_MAXIMIZE)

and it works it open google chrome but it does not open it in max window, as it should do becuse i use the command @SW_MAXIMIZE?

  • Developers
Posted (edited)

firstly: the command you run doesn't make sense. Why have @WindowsDir infront of an already complete path?

As to @SW_Maximize: Not all programs will "listen" to the Maximize message at startup.

You could try to just run Chrome, wait for it to appear with WinWait() and then do a WinSetState().

Jos

Edited by Jos

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

Posted (edited)

hi.

i was a time ago when i was using autoit and now i need som help when i want my script to open google chrom. this is how my scrips looks now.

Run(@WindowsDir & "C:\Users\Mattias\AppData\Local\Google\Chrome\Application\chrome.exe","",@SW_MAXIMIZE)

and it works it open google chrome but it does not open it in max window, as it should do becuse i use the command @SW_MAXIMIZE?

Run("C:\Users\Mattias\AppData\Local\Google\Chrome\Application\chrome.exe","",@SW_MAXIMIZE)

That should fix your problem I would think.

You put @WinodwsDir &

That would make your actual path something along the lines of

C:\Windows\C:\Users\Mattias\AppData\Local\Google\Chrome\Application\chrome.exe

I'm surprised it worked at all like that.

I tested it out on my local machine seems to work.

Edit: Actually it would be C:\WindowsC:\Users\Mattias\AppData\Local\Google\Chrome\Application\chrome.exe

Which may have been why it worked. lol.

Edited by Kenna

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
  • Recently Browsing   0 members

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