AutoHotkey Community

It is currently May 27th, 2012, 4:42 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: March 9th, 2010, 12:53 pm 
Offline

Joined: March 9th, 2010, 10:05 am
Posts: 10
I'm trying to make a GUI to access a site a specific key combination (either Alt+C, or Ctrl+Alt+C, or Ctrl+Shift+C). The problem is that all the combinations work, always; it doesn't matter which one I've selected.

Code:
Gui, Add, DropDownList, x1 y1 w170 Drop, Alt+C||Ctrl+Alt+C|Ctrl+Shift+C
Gui, Show, x485 y345 h58 w308, Charazay HotKey
Return

!c::
if (DropDownList = "Alt+C")
{
IfWinExist, Charazay Basketball Manager - Opera
   WinActivate
else
   Run http://www.charazay.com
return
}

^!c::
if (DropDownList = "Ctrl+Alt+C")
{
IfWinExist, Charazay Basketball Manager - Opera
   WinActivate
else
   Run http://www.charazay.com
return
}

^+c::
if (DropDownList = "Ctrl+Shift+C")
{
IfWinExist, Charazay Basketball Manager - Opera
   WinActivate
else
   Run http://www.charazay.com
return
}

GuiClose:
  ExitApp
return


Help!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 9th, 2010, 2:16 pm 
Offline

Joined: June 6th, 2006, 3:19 pm
Posts: 1654
Location: Denmark
Code:
!c::
if (DropDownList = "Alt+C")
{
IfWinExist, Charazay Basketball Manager - Opera
   WinActivate
else
   Run http://www.charazay.com
return
}
return

_________________
RegEx Powered Dynamic Hotstrings
COM
AutoHotkey 2


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 9th, 2010, 4:38 pm 
Offline

Joined: March 9th, 2010, 10:05 am
Posts: 10
I ended up doing the script a bit differently and I got it to work flawlessly. Those missing returns were part of the problem. Thanks man!


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: 0x150||ISO, Bing [Bot], rbrtryn, Yahoo [Bot] and 67 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