Login Page - Create Account

Support Board


Date/Time: Thu, 28 Nov 2024 22:28:54 +0000



Solved within AHK--> was Enhance 'Goto Chart Number' within the 'Windows' on SC main menu

View Count: 1851

[2020-07-01 13:06:29]
JohnR - User831573 - Posts: 306
First, my request - Add Goto Chart by Name

My Logic and reasons

- It would make using AutHotKey with SC a more dependable, less restrictive setup.

- It can use the field 'Title Bar Name' on AdvSet2 as the GOTO criteria

- I use AutoHotKey. I use the computer for more than just SC, thus I switch off do something or 2, or 3, then I have a script that brings SC back to a known set of charts on top, cursor in right fill space and click to get all charts to sync to current bar. Though it is possible today, it can be done. I currently WinSpy the app icon location, which is always in the same place on the taskbar, then determine each window location in next level popup and click on it. This has issues if I delete and add a new chart to the chartbook. Or I can use chart #. Using Chart # means if I want to use a macro that works on multiple chartbooks, as I create my chartbook, I need to create each chart in a specific sequence so they get the same chart# in all chartbooks. Using names is much easier. It is also has issues when adding / deleting charts.

- Having goto ->TitleBarName<- lets me create a chart window, experiment with it, then use it to replace a different one within the chartbook. Now it is a different # which I can't change, but it could have the correct name with a simple edit to TitleBarName.

JohnR
Date Time Of Last Edit: 2020-07-01 13:06:55
[2020-07-01 13:29:00]
User907968 - Posts: 823
Did you already try using AHK functions 'WinExist' and 'WinActivate'?
These (amongst others) can be used for directly getting windows by title.
[2020-07-01 18:20:17]
JohnR - User831573 - Posts: 306
Well, there you go. It is possible for an old dog to learn something !!! Thanks for jumping in and sharing. I had not come across that capability yet. Now to try to build a script later tonight. That would be less script lines, a lot cleaner. I'll try to make a script to do that tonight.

Thanks,
JohnR
Date Time Of Last Edit: 2020-07-01 18:20:54
[2020-07-01 19:34:16]
JohnR - User831573 - Posts: 306
I just successfully created a test script to run an AHK using WinExist and WinActivate on 2 SC chart windows. Way, way faster.

User907968 - thanks again for sharing.

To get it to work in each of the charts, I changed the Adv settings pg 2 Title Bar Name and check box for Use Title Bar Name as Tab Label.

Very kewl - thanks again

JohnR

;===========
;
; Win=# + Alt=! + w = brings 2 Sierra Chart windows to the front for Test use.
;
>#!w::
if WinExist("JOR_Test_2")
  WinActivate ;
Sleep 200
if WinExist("JOR_Test_1")
  WinActivate ;
return
imageSC_Forum_AHK_Settings 2020-07-01_15-11-02.jpg / V - Attached On 2020-07-01 19:13:29 UTC - Size: 27.71 KB - 480 views
[2021-07-14 17:03:19]
Mattc55 - Posts: 97
thank you all for the feedback, a bit over my head... will just suck it up and click!

thanks!
[2023-03-21 08:30:21]
User588795 - Posts: 5
Hi @JohnR! Did you have to detach your chart windows for your ahk script to work? I find that if I don't detach the charts beforehand, WinExist is unable to detect the charts I want to pull to the foreground.

Hoping you have a neat solution for this, as I don't want to have my 7 charts individually taking up space on the task bar.
Date Time Of Last Edit: 2023-03-21 08:30:45
[2023-03-21 15:13:05]
JohnR - User831573 - Posts: 306
If you change the way Win10 shows icons, you can only see one icon per similar windows.

Right click on the taskbar, then select Taskbar setting at the bottom of the list. This window will appear. Set this option to combine taskbar buttons.
so, all copies of a program / window will be combined / stacked into one icon on the taskbar.
Example -- if you have 3 copies of File Explorer open, there will be one File Explorer on the task bar. Clicking the FileExplorer icon in the win10 taskbar, will make a 2nd row of icons appear above it, of the actual instances "windows" of file explorer.

If you have SC charts as detached, then after doing this all of the SC windows, including detached chart windows will appear as a single icon on taskbar. When you click over the icon, there will be a 2nd row of icons, which will be all of the detached charts. If you do not like Win10 to operate this way, you can always change it back.

Hope this makes sense.

JohnR
Date Time Of Last Edit: 2023-03-21 15:15:45
imagesc_Detached charts appear in Taskbar 2nd row.jpg / V - Attached On 2023-03-21 15:11:36 UTC - Size: 95.78 KB - 123 views
imageSC_stack Win10-Detached Charts.jpg / V - Attached On 2023-03-21 15:12:28 UTC - Size: 202.32 KB - 116 views
[2023-03-21 16:01:17]
User588795 - Posts: 5
Thanks for your quick response :) Yup, I'm aware that I can group together icons on the task bar but I much prefer to keep them separated - it's the only reason why I've been avoiding the free upgrade to win11 lol

I suppose it's not possible to keep my charts attached to the main sierra application for this ahk script to work then? Do you have them detached?
[2023-03-22 12:43:18]
JohnR - User831573 - Posts: 306
In AHK you can replicate a sequence of keystrokes to do the same thing. Maybe something like this,

WinExist - the main window
activate it
then send ALT W 2 times ( this will get to Window in the menu then to CW which will open the window list of open charts
then send keystroke to move down x times to get to the desired chart (This gets you to the desired chart
then send Enter - which will select / bring to the front the desired chart

The above should work.

Hope this helps.
JohnR

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account