<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sas Eg with autohotkey - toggle between open programs in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Sas-Eg-with-autohotkey-toggle-between-open-programs/m-p/470229#M30507</link>
    <description>7.12 HF7 (7.100.2.3491) (64-bit)&lt;BR /&gt;platform version 9.4.3.0</description>
    <pubDate>Thu, 14 Jun 2018 09:48:47 GMT</pubDate>
    <dc:creator>PavelD</dc:creator>
    <dc:date>2018-06-14T09:48:47Z</dc:date>
    <item>
      <title>Sas Eg with autohotkey - toggle between open programs</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Sas-Eg-with-autohotkey-toggle-between-open-programs/m-p/469862#M30478</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;I'm following up on this closed thread:&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-keyboard-shortcuts-previously-open-drop-down-list/m-p/269401/highlight/true#M18658" target="_blank"&gt;https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-keyboard-shortcuts-previously-open-drop-down-list/m-p/269401/highlight/true#M18658&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I cannot comment on that anymore.&lt;BR /&gt;Any news from the development team?&lt;BR /&gt;&lt;BR /&gt;In particular, is there already a keyboard shortcut to switch between different open programs?&lt;BR /&gt;&lt;BR /&gt;I tried to force autohotkey to "click" on the drop-down menu where the programs are listed, but with no success.&lt;BR /&gt;&lt;BR /&gt;Any ideas or autohotkey snippets would be much appreciated! Thank you!</description>
      <pubDate>Wed, 13 Jun 2018 09:54:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Sas-Eg-with-autohotkey-toggle-between-open-programs/m-p/469862#M30478</guid>
      <dc:creator>PavelD</dc:creator>
      <dc:date>2018-06-13T09:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sas Eg with autohotkey - toggle between open programs</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Sas-Eg-with-autohotkey-toggle-between-open-programs/m-p/469922#M30481</link>
      <description>&lt;P&gt;There isn't a direct key for this.&amp;nbsp; Use Shift+F6 to navigate among the main panes of your workspace, then arrow/Enter to select content in there (like programs from a list in your project tree).&amp;nbsp; You might be able to come up with an AutoHotkey script that does this for you.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 13:23:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Sas-Eg-with-autohotkey-toggle-between-open-programs/m-p/469922#M30481</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-06-13T13:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Sas Eg with autohotkey - toggle between open programs</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Sas-Eg-with-autohotkey-toggle-between-open-programs/m-p/469926#M30482</link>
      <description>Thanks Chris. I seem to have the same problem as the author of the original post - F6 and Shift+F6 does not work in the editor window.&lt;BR /&gt;&lt;BR /&gt;Re autohotkey script - I was exactly hoping somebody could share her/his code. I failed to produce anything usable. Thank you</description>
      <pubDate>Wed, 13 Jun 2018 13:34:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Sas-Eg-with-autohotkey-toggle-between-open-programs/m-p/469926#M30482</guid>
      <dc:creator>PavelD</dc:creator>
      <dc:date>2018-06-13T13:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Sas Eg with autohotkey - toggle between open programs</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Sas-Eg-with-autohotkey-toggle-between-open-programs/m-p/470000#M30487</link>
      <description>&lt;P&gt;Can you tell us what version of EG you're using?&amp;nbsp; Shift+F6 works for me with v7.15.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 16:57:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Sas-Eg-with-autohotkey-toggle-between-open-programs/m-p/470000#M30487</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-06-13T16:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sas Eg with autohotkey - toggle between open programs</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Sas-Eg-with-autohotkey-toggle-between-open-programs/m-p/470229#M30507</link>
      <description>7.12 HF7 (7.100.2.3491) (64-bit)&lt;BR /&gt;platform version 9.4.3.0</description>
      <pubDate>Thu, 14 Jun 2018 09:48:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Sas-Eg-with-autohotkey-toggle-between-open-programs/m-p/470229#M30507</guid>
      <dc:creator>PavelD</dc:creator>
      <dc:date>2018-06-14T09:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sas Eg with autohotkey - toggle between open programs</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Sas-Eg-with-autohotkey-toggle-between-open-programs/m-p/473979#M30744</link>
      <description>&lt;P&gt;So here is my attempt how to simulate opening drop down menu (listing open&amp;nbsp;programs) in two windows, such as here in the picture (&lt;FONT color="#ff0000"&gt;red boxes&lt;/FONT&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas autohotkey.png" style="width: 454px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21462i630D66A0A101B824/image-size/large?v=v2&amp;amp;px=999" role="button" title="sas autohotkey.png" alt="sas autohotkey.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code explained:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1) The dropdowns are located on the upper bars. Click &lt;FONT color="#ff6600"&gt;somewhere on the upper bar&lt;/FONT&gt; and&amp;nbsp;retrieve the ClassNN of these bars via &lt;FONT color="#ff00ff"&gt;MouseGetPos&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;1) Get the coords of the upper left corner of the control (see the &lt;FONT color="#339966"&gt;green X&lt;/FONT&gt; in the picture above).&lt;/P&gt;&lt;P&gt;2) &lt;FONT color="#0000ff"&gt;Offset a little bit&lt;/FONT&gt; from the corners so the cursor is in the middle of the dropdown.&lt;/P&gt;&lt;P&gt;3) &lt;FONT color="#ff0000"&gt;Click twice, with 250ms in between clicks&lt;/FONT&gt; (one click is not enough for some reason). Note: ControlClick does not work. Change the delay if needed.&lt;/P&gt;&lt;P&gt;4) Move cursor back where it was originally.&lt;/P&gt;&lt;P&gt;5) &lt;FONT color="#cc99ff"&gt;Hotkeys Alt+Left or Alt+Right&lt;/FONT&gt; to show dropdown menu in the left or right window.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ConGetPos(RightQ)
{
	;get control ClassNN of the upper bars where the dropdowns are located
	&lt;FONT color="#ff6600"&gt;LeftBoxX = 350 ;approx location of the left bar
	LeftBoxY = 75
	RightBoxX = 1350 ;approx location of the right bar
	RightBoxY = 75&lt;/FONT&gt;
	SetMouseDelay, 0
	MouseGetPos, CurrX, CurrY
	if (RightQ = 0)
		{
		MouseMove, %LeftBoxX%, %LeftBoxY%
		&lt;FONT color="#ff00ff"&gt;MouseGetPos&lt;/FONT&gt;, , , , ClassAtPos
		}
	if (RightQ = 1)
		{
		MouseMove, %RightBoxX%, %RightBoxY%
		&lt;FONT color="#ff00ff"&gt;MouseGetPos&lt;/FONT&gt;, , , , ClassAtPos
		}	

	ControlGetPos, xCon, yCon, ,, %ClassAtPos%
	&lt;FONT color="#0000ff"&gt;xShifted:=xCon+15
	yShifted:=yCon+15&lt;/FONT&gt;&lt;FONT color="#ff0000"&gt;	&lt;BR /&gt;	Click, %xShifted% %yShifted%
	sleep 250
	Click, %xShifted% %yShifted%&lt;/FONT&gt;
	MouseMove, %CurrX%, %CurrY%
}


&lt;FONT color="#cc99ff"&gt;!Left::ConGetPos(0)
!Right::ConGetPos(1)&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: First version of the code was very unstable (the ClassNN of the upper bars changes often and cannot be hardcoded).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;ADDED&amp;nbsp;2018-07-03: Toggle between the right and left editor windows&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;If you have an older version of SAS EG (V7.12 in my case), the command F6 might not work.&lt;/P&gt;&lt;P&gt;Here is autohotkey workaround (keyboard shortcut RightShift+Tab):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;; toggle between the right and left editor windows
; Right Shift+Tab
RShift &amp;amp; Tab::
;get control ClassNN of the left and right editor
	; first let's find 
	LeftEditorX = 350 ;approx location of the left editor window
	LeftEditorY = 400
	RightEditorX = 1350 ;approx location of the right editor window
	RightEditorY = 400
	SetMouseDelay, 0
	;save current coords
	MouseGetPos, CurrX, CurrY
	
	; pos of the left editor
	MouseMove, %LeftEditorX%, %LeftEditorY%
	MouseGetPos, , , , ClassAtPosLeft
	
	; pos of the right editor
	MouseMove, %RightEditorX%, %RightEditorY%
	MouseGetPos, , , , ClassAtPosRight
	; what is the class under the caret?
	MouseMove, %A_CaretX%, %A_CaretY%
	MouseGetPos, , , , CurrentCaretClass
	;toggle
	if (CurrentCaretClass = ClassAtPosLeft)
		ControlFocus, %ClassAtPosRight%
	else
		ControlFocus, %ClassAtPosLeft%

	MouseMove, %CurrX%, %CurrY%
return&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Jul 2018 07:35:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Sas-Eg-with-autohotkey-toggle-between-open-programs/m-p/473979#M30744</guid>
      <dc:creator>PavelD</dc:creator>
      <dc:date>2018-07-03T07:35:54Z</dc:date>
    </item>
  </channel>
</rss>

