Sign in to follow this  
Followers 0
ecstatic

Send +F1 Variable not working.

9 posts in this topic

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



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

#4 ·  Posted (edited)

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

Edited by Jos

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

Share this post


Link to post
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}"))

Share this post


Link to post
Share on other sites

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

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                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

lemme try.

Share this post


Link to post
Share on other sites

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