Jump to content

Send +F1 Variable not working.


Recommended Posts

Hey guys.

$Cta1 = F1
$Cta2 = F2
        Send($Cta1)
        Sleep(500)
        MouseDown("Right")
        MouseUp("Right")
        Sleep(500)
        Send($cta2)

I need my script to send("{F1}") as a key down not as keys "f1"

but i also need it to be f-key customizable.

Link to comment
Share on other sites

The problem with that is

IniWrite("Config.ini", "Skills", "Cta1", GUICtrlRead($Cta1))
            IniWrite("Config.ini", "Skills", "Cta2", GUICtrlRead($Cta2))

Is from my configuration GuI.

So they type in their Function key. Then the bot reads it from the ini.

It wont work if i do

IniWrite("Config.ini", "Skills", "Cta1", GUICtrlRead("{$Cta1}"))
            IniWrite("Config.ini", "Skills", "Cta2", GUICtrlRead("{$Cta2}"))
Link to comment
Share on other sites

  • Developers

IniWrite("Config.ini", "Skills", "Cta1", "{" & GUICtrlRead($Cta1) & "}")

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

GUICtrlRead requires a GUI Control handle/name as the parameter, so of course it won't work:

IniWrite("Config.ini", "Skills", "Cta1", GUICtrlRead("{$Cta1}"))
            IniWrite("Config.ini", "Skills", "Cta2", GUICtrlRead("{$Cta2}"))

Link to comment
Share on other sites

  • Developers

I assume you do something like:

$cta = IniRead("Config.ini", "Skills", "Cta1", "")
Send($Cta)

Doesn't that work?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

This works fine for me when run from SciTE:

Iniwrite("Config.ini", "Skills", "Cta1", "{f1}")
$cta = IniRead("Config.ini", "Skills", "Cta1", "")
Send($Cta)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

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