AHK Driving ThinkorSwim

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
MrBruceKA
Posts: 10
Joined: 23 Jan 2020, 11:27

AHK Driving ThinkorSwim

27 Jan 2020, 13:54

Using Win/10, with latest download of AHK.

I want to use AHK to do some work driving TD America ThinkorSwim desktop Trading Platform.
I made sure both AHK & TOS have Admin privs, it appears AHK doesn't drive TOS.

I have only three lines of AHK code:

WinActivate Main@thinkorswim [build 1961] ahk_class SunAwtFrame
Click, Left, 1259 ,53
Sleep 2000

When I personally click this spot in TOS, a drop-down menu will appear. Then I can select the function i want, but i don't get anything when AHK is run.
I got the WinActivate parameters from WindowSpy.ahk and I made sure I was on the TOS active window for them.

Please give me some direction on my problem.
Thanks, Bruce
User avatar
Chunjee
Posts: 1417
Joined: 18 Apr 2014, 19:05
Contact:

Re: AHK Driving ThinkorSwim

27 Jan 2020, 15:16

You might try a second click.

Hopefully you aren't putting thousands on the line with an ahk script. If you are, hire me. I am familiar with ThinkorSwim.
MrBruceKA
Posts: 10
Joined: 23 Jan 2020, 11:27

Re: AHK Driving ThinkorSwim

27 Jan 2020, 17:35

Thanks, I'll try in it the morning. I hope it works.

Bruce

PS: Selling Vertical Options is Very, Very, profitable these days.
MrBruceKA
Posts: 10
Joined: 23 Jan 2020, 11:27

Re: AHK Driving ThinkorSwim

29 Jan 2020, 10:43

No change is connecting AHK to ThinkOrSwim(TOS) application.

I tries this code, but nothing happens. When I personally click this spot a down-down menu appears. that is what I want to happen, but I can not figure out how to get TOS to respond.

WinActivate Main@thinkorswim [build 1961] ahk_class SunAwtFrame
Click, Left, 1259 ,53
Sleep 500
Click, Left, 1259 ,53
Sleep 2000
Exit
User avatar
Chunjee
Posts: 1417
Joined: 18 Apr 2014, 19:05
Contact:

Re: AHK Driving ThinkorSwim

29 Jan 2020, 12:06

You might try mousemove to ensure that those cords are what you think they are.

Code: Select all

MouseMove, 1259, 53
Send {Click}
MrBruceKA
Posts: 10
Joined: 23 Jan 2020, 11:27

Re: AHK Driving ThinkorSwim

29 Jan 2020, 16:25

worked - Thanks

I don't know the difference between what I was doing and your code.

I can go on with what I need to do

Thanks alot!!
rc76
Posts: 144
Joined: 07 Nov 2020, 01:45

Re: AHK Driving ThinkorSwim

27 Sep 2021, 23:25

@MrBruceKA , may you please share some experience on how we can use AHK on Options in Thinkorswim please?

Is it possible to use AHK to auto trade Options on Thinkorswim?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mamo691, MrDoge, ReyAHK and 247 guests