Jump to content
Sign in to follow this  
ecstatic

Send +F1 Variable not working.

Recommended Posts

ecstatic

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.

Share this post


Link to post
Share on other sites
ecstatic

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}"))

Share this post


Link to post
Share on other sites
Jos

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

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
DaRam

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}"))

Share this post


Link to post
Share on other sites
ecstatic

Jos, now it does this

$cta = {f1}

Send($Cta1) = Send({f1}) and not Send("{F1}")

Share this post


Link to post
Share on other sites
Jos

I assume you do something like:

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

Doesn't that work?


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Jos

This works fine for me when run from SciTE:

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.