AutoHotkey Community

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: October 17th, 2009, 1:30 pm 
Offline

Joined: October 5th, 2009, 1:08 pm
Posts: 22
I've put a shortcut to a folder in my start menu so when I boot windows the folder opens on the desktop, to put the window into full screen I have to press f11 (so I dont see the toolbar etc).
What I would like to do is also put a autohotkey script into the startup folder that once the window opens auto hotkey will automaticlly send the f11 command to it an put it into full screen...... how would I do that?

Or... I suppose a script that runs the folder shortcut and then sends the f11 command. Then I just put the script into my startup folder and not both.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 17th, 2009, 5:58 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
Try ControlSend - here's an example:
Code:
WinName := "" ; enter Window Name

While !WinExist(WinName) ; wait for window to exist
   Sleep, 100
WinActivate, %WinName%
ControlSend, , {F11}, %WinName%

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
PostPosted: October 17th, 2009, 6:20 pm 
Offline

Joined: April 8th, 2009, 7:49 pm
Posts: 6074
Location: San Diego, California
jethrow beat me, but I like mine better :)

retromax wrote:
Or... I suppose a script that runs the folder shortcut and then sends the f11 command. Then I just put the script into my startup folder and not both.

I'm not sure of the timing and order the shortcuts in startup are invoked, so I like your last idea better.

As written, this script will open the working directory, which is where every the *.exe is placed; or you can paste a shortcut to startup and modify the working directory within the shortcut. Of course you can code the explicit path as well (C:\Users\Leef_me...). Either way, only one entry added to startup.

I call it Open_F11 :wink:

Code:
;#q::   ; <--- tested using a hotkey, currently disabled

SetTitleMatchMode 2

; you can either specifically choose the explorer window to send F11
open_dir=C:\Users\Leef_me\Documents\Downloaded Files  ; <---- insert your preferred location here

; or you can use the working directory
open_dir:= A_WorkingDir   ; <--- or you can use the assigned working directory

;msgbox %open_dir%   ; for testing
;return

run, %open_dir%
winwait, %open_dir%   ; <--- wait for the window to exist
;winactivate ; <--- not needed

send {f11}
return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 17th, 2009, 7:11 pm 
Offline

Joined: October 5th, 2009, 1:08 pm
Posts: 22
Ok don't know what i'm doing wrong but I cant get either of them to work!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 17th, 2009, 11:27 pm 
Offline

Joined: April 8th, 2009, 7:49 pm
Posts: 6074
Location: San Diego, California
Useful Feedback please:

1. Do you have Ahk installed ?
2. did you copy /paste my script into a text file with AHK extension ?
3. did you try double-clicking said AHk file while viewing a list of it and other files in Windows Explorer (did you run it, in other words)?
4. what happened ?
a) computer blew up / shut down / blue screened
b) Ahk compiler complained about an error
c) file ran, showed icon in taskbar or tray and then dissapeared
d) current W.E. window acted like F11 pushed


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 17th, 2009, 11:34 pm 
Offline

Joined: October 5th, 2009, 1:08 pm
Posts: 22
Leef_me wrote:
Useful Feedback please:

1. Do you have Ahk installed ?
2. did you copy /paste my script into a text file with AHK extension ?
3. did you try double-clicking said AHk file while viewing a list of it and other files in Windows Explorer (did you run it, in other words)?
4. what happened ?
a) computer blew up / shut down / blue screened
b) Ahk compiler complained about an error
c) file ran, showed icon in taskbar or tray and then dissapeared
d) current W.E. window acted like F11 pushed


the window opened but didn't go into the f11 fullscreen mode


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 17th, 2009, 11:49 pm 
Offline

Joined: October 5th, 2009, 1:08 pm
Posts: 22
Leef_me wrote:
Useful Feedback please:

1. Do you have Ahk installed ?
2. did you copy /paste my script into a text file with AHK extension ?
3. did you try double-clicking said AHk file while viewing a list of it and other files in Windows Explorer (did you run it, in other words)?
4. what happened ?
a) computer blew up / shut down / blue screened
b) Ahk compiler complained about an error
c) file ran, showed icon in taskbar or tray and then dissapeared
d) current W.E. window acted like F11 pushed


I've removed the confusing bits and tried this:-
Code:
SetTitleMatchMode 2

open_dir=C:\links 


run, %open_dir%
winwait, %open_dir%   


send {f11}
return

and it does the same thing, it opens my "links" folder but doesn't send the f11 to make it full screen??


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 18th, 2009, 12:03 am 
Offline

Joined: October 5th, 2009, 1:08 pm
Posts: 22
I've just tried a script with just the send {f11} command in it, placed the script inside the folder and ran it and the folder went full screen, the script you said does open my "links" folder but doesn't send it full screen could it possibley need to wait a bit longer??


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 18th, 2009, 12:07 am 
Offline

Joined: July 9th, 2009, 9:25 pm
Posts: 120
Enable Control Panel > Folder Options > View - Display full path in title bar.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 18th, 2009, 12:11 am 
Offline

Joined: October 5th, 2009, 1:08 pm
Posts: 22
retromax wrote:
I've just tried a script with just the send {f11} command in it, placed the script inside the folder and ran it and the folder went full screen, the script you said does open my "links" folder but doesn't send it full screen could it possibley need to wait a bit longer??


Sussed it!!

here's the script.... very small :)
Code:
open_dir=C:\links 
run, %open_dir%

 


send {f11}


thanks for the help


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher and 19 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