AutoHotkey Community

It is currently May 27th, 2012, 6:11 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: November 3rd, 2010, 7:17 pm 
Offline

Joined: April 14th, 2009, 10:06 am
Posts: 28
With the browser closed, i try to open 2 tabs with a hotkey, but it open allways 2 browsers. How can i open the sites in 2 tabs?

The browser i use is Chrome

Thanks

Code:

#k::
   site = www.facebook.com,www.twitter.com
 StringSplit, SiteArray, site, `,
   Loop, %SiteArray0%
   {
   sitio := SiteArray%a_index%
   Tooltip("Loading " . sitio . "...",2000)
   RunWait %sitio%
   }

return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2010, 7:19 pm 
Offline

Joined: February 29th, 2008, 8:36 pm
Posts: 901
Location: Vault 7
Does Chrome have command line options? I know Firefox lets you specify whether to open a link in a new tab or window.

_________________
ImageDebugging,Container,FileContainer,Object Preferences,ShellFileOperation


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2010, 7:30 pm 
Offline

Joined: April 14th, 2009, 10:06 am
Posts: 28
note that i'm not running Chrome directly, but the url's. The command works with the browser running or not running, but i think the RunWait is not waiting the page to load to launch the second url....


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2010, 7:34 pm 
Offline

Joined: February 29th, 2008, 8:36 pm
Posts: 901
Location: Vault 7
Code:
RunWait, c:\path-to-chrome\chrome.exe -newtab www.google.com


or maybe

Code:
Runwait, c:\path-to-chrome\chrome.exe www.google.com www.autohotkey.com


The command line options are where the solution for this is.

_________________
ImageDebugging,Container,FileContainer,Object Preferences,ShellFileOperation


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 4th, 2010, 12:20 pm 
Offline

Joined: April 14th, 2009, 10:06 am
Posts: 28
Rapte_Of_Suzaku wrote:
Code:
RunWait, c:\path-to-chrome\chrome.exe -newtab www.google.com


or maybe

Code:
Runwait, c:\path-to-chrome\chrome.exe www.google.com www.autohotkey.com


The command line options are where the solution for this is.


The second approach works like a charm.

Thank you very much :D


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 4th, 2010, 3:13 pm 
Offline

Joined: February 29th, 2008, 8:36 pm
Posts: 901
Location: Vault 7
:D I was just making an example of what to expect (never trying it myself).

_________________
ImageDebugging,Container,FileContainer,Object Preferences,ShellFileOperation


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], HotkeyStick, Wicked and 56 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group