Jump to content

Need Help With Autokey Toggler


Recommended Posts

Greetings everyone! I am new to Autoit scripting and I have just completed my scripting and I have my GUI completely functional (see pic below).

813ffcd4e6a1e14d83cfa0bbe07b7a48.png

My next question is, how can I extract a key toggle script into the program itself, so when I open/close my program, anyone can press the hot key "F1 or F2" to enable the script above.

My only problem I am encountering is, I do not know how to create the toggle script. How can I convert the AutoHotKey into AutoIt?

Here is the script form AutoHotkey:

$F2:: ;Command button to execute script
 
no_hud++
if (no_hud = 1) ;disable bf3 hud
{
 
Send {vkC0sc029 down}
sleep, 1
Send {vkC0sc029 up}
sleep, 1
send UI.DrawEnable 0 {enter}
sleep, 1
Send {vkC0sc029 down}
sleep, 1
Send {vkC0sc029 up}
 
}
 
if (no_hud = 2) ;Enable bf3 hud
{
 
Send {vkC0sc029 down}
sleep, 1
Send {vkC0sc029 up}
sleep, 1
send UI.DrawEnable 1 {enter}
sleep, 1
Send {vkC0sc029 down}
sleep, 1
Send {vkC0sc029 up}
no_hud = 0
}
 
 
return
Edited by montagesnmore
Link to comment
Share on other sites

  • Moderators

montagesnmore,

Welcome to the AutoIt forum. :)

But that is not AutoIt3 code - are you sure you are on the correct forum? :huh:

And looking at the title of the GUI you posted, you might like to read the Forum rules (there is also a link at bottom right of each page) before you ask any more questions. ;)

M23

Edit: Moved to "General Help and Support" section

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Thanks for the reply, I'm sorry about the forum rules :) ...I am trying to get a key toggler to execute when I open the program. I cannot find out how to do it, unfortunately. The script I provided was from AutoHotKey, however I prefer to use Autoit, because I find it to be a little bit more easier to code. My program is by no means illegal or trying to do anything illegal, spam, etc and alike. I just wanted to know how to create a key toggler so that when you press the button, it opens up the console in the video game and it writes the script for you.

Example:

Press F2 , while you are playing your game, then it opens up the console and enters the command for you. 

I can code greatly in CMD, but I want to take it to the next step by using AutoIT by using GUIs, coding in C++, etc.

Link to comment
Share on other sites

  • Moderators

montagesnmore,

 

I'm sorry about the forum rules

So you read them - and then still expect help for a script which you admit you use while playing a game? :huh:

I suggest you read them more carefully before you post again - thread closed. :naughty:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...