Page 1 of 1

GetText from inactive Tab(s)?

Posted: 18 May 2023 19:56
by kunkel321
Script question. Someone pointed me to this very cool tool someone made with Autohotkey
https://www.voidtools.com/forum/viewtop ... f=2&t=9881
It "sees" what folder is open in XYplorer (and a couple of other managers) and then, if I invoke a Windows Save As or Open dialog, it shows a list of that folder. My knowledge of autohotkey is well below that of the author, NotNull, and my knowledge of XYscript is even less than that. That said... The relevant part of his tool is below. It appears that these two lines of code contain bits of XYscript. I guess a and i are 'active pane' and 'inactive pane?'

Code: Select all

::copytext get('path', a);

Code: Select all

::copytext get('path', i);
Do you guys know if there is an equivalent that will give me the path of an inactive tab?? For simplicity, we'll assume that there is only ever one inactive tab...


Code: Select all

	;---------------[ XYPlorer               ]--------------------------------------

		If ( _thisClass = "ThunderRT6FormDC")
		{
		;	Get Process information for TC icon
			WinGet, _thisPID, PID, ahk_id %_thisID%
			_XYPlorer_exe := GetModuleFileNameEx( _thisPID )

			ClipSaved := ClipboardAll
			Clipboard := ""

			Send_XYPlorer_Message(_thisID, "::copytext get('path', a);")

		;	Check if valid folder first. Only add it if it is.
			If (ErrorLevel = 0) AND ( ValidFolder( clipboard ))
			{
				Menu ContextMenu, Add,  %clipboard%, FolderChoice
				Menu ContextMenu, Icon, %clipboard%, %_XYPlorer_exe%,0, 32
				_showMenu := 1
			}

			Send_XYPlorer_Message(_thisID, "::copytext get('path', i);")

			If (ErrorLevel = 0) AND ( ValidFolder( clipboard ))
			{
				Menu ContextMenu, Add,  %clipboard%, FolderChoice
				Menu ContextMenu, Icon, %clipboard%, %_XYPlorer_exe%,0,32
				_showMenu := 1
			}


			Clipboard := ClipSaved
			ClipSaved := ""
		}

Re: GetText from inactive Tab(s)?

Posted: 18 May 2023 20:11
by highend
::copytext gettoken(get('Tabs_sf', '|', 'a'), 2, '|');

And practically the same for the inactive pane
::copytext gettoken(get('Tabs_sf', '|', 'i'), 2, '|');

Re: GetText from inactive Tab(s)?

Posted: 18 May 2023 20:36
by kunkel321
Yep -- That works perfectly -- Thanks Highend!