AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

F12 = spacebar

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
blind
Guest





PostPosted: Mon Apr 21, 2008 8:57 pm    Post subject: F12 = spacebar Reply with quote

i really have no clue as how to manipulate scripts and such, as i am from a bit older generation than most of you, so i come to you guys for a little assistance, should be an easy fix for most of you AHK users...

basically i am playing an online game, and would like to have the F12 button be pressed by hitting the spacebar (as we all know that F12 is a bit far off from the usual aswd/12345 keys)

something like pressing the numpad + key activate the script and numpad - key to diable it (as i will need the spacebar when typing)

so:
(typing random stuff)
i press NUM+ (activates it)
use spacebar for the duration of its purpose
press NUM- to deactivate (so i can type normaly again)

oh, and another note, can it be looped? like after i press NUM- it only needs to wait for me to press NUM+ again?

thanks in advance to anyone willing to give it a shot
Back to top
Moki



Joined: 23 Feb 2008
Posts: 96
Location: North Carolina

PostPosted: Mon Apr 21, 2008 9:16 pm    Post subject: Reply with quote

Code:

space::{f12}


EDIT: Oops I just noticed that you wanted to use space for other things as well
_________________
http://www.mofiki.com
Back to top
View user's profile Send private message
Moki



Joined: 23 Feb 2008
Posts: 96
Location: North Carolina

PostPosted: Mon Apr 21, 2008 9:22 pm    Post subject: Reply with quote

You could try ctr+space to activate F12 keystroke to avoid having to cut anything on or off.

Code:
^space::{f12}


Just run the script and whenever you hit ctrl+space it will simulate F12 key
_________________
http://www.mofiki.com
Back to top
View user's profile Send private message
Syzygy
Guest





PostPosted: Fri May 23, 2008 4:02 pm    Post subject: Reply with quote

I have been trying to write a similar script to no avow. My goal is that when I press the F1 key the "a" key becomes "z" and the "d" to become "c". Then if I press the F1 key again the 'a' and 'c' will revert back to their normal function. Any ideas?
Back to top
Rhys



Joined: 17 Apr 2007
Posts: 722
Location: Florida

PostPosted: Fri May 23, 2008 4:52 pm    Post subject: Reply with quote

DISCLAIMER: There is probably a better way to do this but I CBA to RTFM.

@Blind:
Code:
Hotkey,Space,Spc,Off ;Starts out off...
Return

NumpadAdd::Hotkey,Space,Toggle

Spc:
Send,{F12}
Return


@Syzygy:
Code:
Hotkey,a,a,Off
Hotkey,d,d,Off
Return

F1::
Hotkey,a,Toggle
Hotkey,d,Toggle
Return

a:
send,z
Return

d:
send,c
Return

_________________
[Join IRC!]
Back to top
View user's profile Send private message
Syzygy
Guest





PostPosted: Fri May 23, 2008 5:17 pm    Post subject: Reply with quote

I tried the script you wrote. Whenever I press F1 I am getting an error stating that there is an nonexistant hotkey. Any ideas? And thanks again for helping out so fast!
Back to top
Rhys



Joined: 17 Apr 2007
Posts: 722
Location: Florida

PostPosted: Fri May 23, 2008 5:32 pm    Post subject: Reply with quote

It works on my PC and was tested by Titan (thx) and he said it worked too - Did you copy the code exactly as I've got it up there?

Edit: He suggested a cleaner solution, but if you have other hotkeys that you want on all the time, it might not work for you...
Code:
a::z
d::c
F1::Suspend


; remapping ftw

_________________
[Join IRC!]
Back to top
View user's profile Send private message
Syzygy



Joined: 23 May 2008
Posts: 1

PostPosted: Fri May 23, 2008 5:51 pm    Post subject: Reply with quote

My mistake, it works! I have lot of other hotkeys running at the same time and I think they were interacting strangely. Thanks again! Also just started using this program yesterday and I am looking for a tutorial that has more examples with comments, I tend to learn things faster when I have a working model in front of me that I can pick apart to see how it works.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group