Sign in to follow this  
Followers 0
DaRK_IMMoRTAL

I wanna be able to use F1 and F2 keys etc.

2 posts in this topic

#1 ·  Posted (edited)

hey, im new. trying to figure some of this out but im lost on alot of it besides some of the common sense stuff.

I wanna be able to use F1 - F11 keys..... is F12 impossible to use because it is reserved for windows... ? x.X

anyways this is for a game I play. Diablo II - LoD. >;D

anyways here's the code.

If FileExists("Configuration.ini") Then

$hotkey1 = IniRead("configuration.ini", "hotkeys", "$hotkey1", "NotFound")

$hotkey2 = IniRead( "configuration.ini", "hotkeys", "$hotkey2", "NotFound" )

$hotkey3 = IniRead( "configuration.ini", "hotkeys", "$hotkey3", "NotFound" )

$hotkey4 = IniRead( "configuration.ini", "hotkeys", "$hotkey4", "NotFound" )

$hotkey5 = IniRead( "configuration.ini", "hotkeys", "$hotkey5", "NotFound" )

$hotkey6 = IniRead( "configuration.ini", "hotkeys", "$hotkey6", "NotFound" )

$hotkey7 = IniRead( "configuration.ini", "hotkeys", "$hotkey7", "NotFound" )

$hotkey8 = IniRead( "configuration.ini", "hotkeys", "$hotkey8", "NotFound" )

$hotkeyexit = IniRead( "configuration.ini", "hotkeys", "$hotkeyexit", "NotFound" )

$message1 = IniRead("configuration.ini", "messages", "$message1", "NotFound")

$message2 = IniRead( "configuration.ini", "messages", "$message2", "NotFound" )

$message3 = IniRead( "configuration.ini", "messages", "$message3", "NotFound" )

$message4 = IniRead( "configuration.ini", "messages", "$message4", "NotFound" )

$message5 = IniRead( "configuration.ini", "messages", "$message5", "NotFound" )

$message6 = IniRead( "configuration.ini", "messages", "$message6", "NotFound" )

$message7 = IniRead( "configuration.ini", "messages", "$message7", "NotFound" )

$message8 = IniRead( "configuration.ini", "messages", "$message8", "NotFound" )

HotKeySet($hotkey1, "sendmsg1")

HotKeySet($hotkey2, "sendmsg2")

HotKeySet($hotkey3, "sendmsg3")

HotKeySet($hotkey4, "sendmsg4")

HotKeySet($hotkey5, "sendmsg5")

HotKeySet($hotkey6, "sendmsg6")

HotKeySet($hotkey7, "sendmsg7")

HotKeySet($hotkey8, "sendmsg8")

HotKeySet($hotkeyexit, "Terminate")

Else

IniWrite ( "configuration.ini", "hotkeys", "$hotkey1", '"1"' )

IniWrite ( "configuration.ini", "hotkeys", "$hotkey2", '"2"' )

IniWrite ( "configuration.ini", "hotkeys", "$hotkey3", '"3"' )

IniWrite ( "configuration.ini", "hotkeys", "$hotkey4", '"4"' )

IniWrite ( "configuration.ini", "hotkeys", "$hotkey5", '"5"' )

IniWrite ( "configuration.ini", "hotkeys", "$hotkey6", '"6"' )

IniWrite ( "configuration.ini", "hotkeys", "$hotkey7", '"7"' )

IniWrite ( "configuration.ini", "hotkeys", "$hotkey8", '"8"' )

IniWrite ( "configuration.ini", "hotkeys", "$hotkeyexit", '"9"' )

IniWrite ( "configuration.ini", "messages", "$message1", "First message." )

IniWrite ( "configuration.ini", "messages", "$message2", "{!}My message will be above my head now." )

IniWrite ( "configuration.ini", "messages", "$message3", "third" )

IniWrite ( "configuration.ini", "messages", "$message4", "fourth" )

IniWrite ( "configuration.ini", "messages", "$message5", "fifth" )

IniWrite ( "configuration.ini", "messages", "$message6", "sixth" )

IniWrite ( "configuration.ini", "messages", "$message7", "seventh" )

IniWrite ( "configuration.ini", "messages", "$message8", "eighth" )

Exit 0

EndIf

While 1

sleep(100)

Wend

Func sendmsg1()

Send("{ENTER}")

Sleep(100)

Send($message1)

Send("{ENTER}")

EndFunc

Func sendmsg2()

Send("{ENTER}")

Sleep(100)

Send($message2)

Send("{ENTER}")

EndFunc

Func sendmsg3()

Send("{ENTER}")

Sleep(100)

Send($message3)

Send("{ENTER}")

EndFunc

Func sendmsg4()

Send("{ENTER}")

Sleep(100)

Send($message4)

Send("{ENTER}")

EndFunc

Func sendmsg5()

Send("{ENTER}")

Sleep(100)

Send($message5)

Send("{ENTER}")

EndFunc

Func sendmsg6()

Send("{ENTER}")

Sleep(100)

Send($message6)

Send("{ENTER}")

EndFunc

Func sendmsg7()

Send("{ENTER}")

Sleep(100)

Send($message7)

Send("{ENTER}")

EndFunc

Func sendmsg8()

Send("{ENTER}")

Sleep(100)

Send($message8)

Send("{ENTER}")

EndFunc

Func Terminate()

Send("{ENTER}")

Sleep(100)

Send("EXIT")

Send("{ENTER}")

Exit 0

EndFunc

Edited by DaRK_IMMoRTAL

Share this post


Link to post
Share on other sites



HI,

right from help:

The following hotkeys cannot be set:

Ctrl+Alt+Delete It is reserved by Windows 
F12 It is also reserved by Windows, according to its API.

The other F keys should work this way "{F1}" you have to do that in you ini I suppose.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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  
Followers 0