Jump to content
Sign in to follow this  
rakarna

need help with run a program

Recommended Posts

rakarna

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?

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Kenna

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

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  

×