Page 1 of 1

Request columns, popupnested() / popupmenu()

Posted: 10 Jan 2017 09:21
by edyyus
Request columns, popupnested() / popupmenu()

I like if admin can add more function in popupnested() / popupmenu() commad in next Update

Like column separator and Maximum Width columns

Like FolderMenu3 EX
viewtopic.php?f=11&t=9452


Other
and more more better if can loading xys script without active(popup) Main XYplorer windows
i can't find way to do this, like run xys script in background, Just show windows popup(ontop) menu, echo, msg, input or text windows

Very usefull if loding(external call) from run command from another software like text editor(editplus)

Wait for next Xyplorer Update

Re: Request, popupnested()

Posted: 10 Jan 2017 10:01
by highend
if can loading xys script without active(popup) Main XYplorer windows
Which popup should that be? Sending a script to an XY instance via WM_COPYDATA
doesn't bring XY to the front and the rest depends on the script content

Re: Request, popupnested()

Posted: 10 Jan 2017 14:17
by edyyus
highend wrote:
if can loading xys script without active(popup) Main XYplorer windows
Which popup should that be? Sending a script to an XY instance via WM_COPYDATA
doesn't bring XY to the front and the rest depends on the script content
Thank highend for info

I try using autoit3 or autohotkey script
https://autohotkey.com/board/topic/9010 ... pt-to-ahk/

sample autoit3 script from link above (Binocular222)
it work, but message windows not on top from my editor
must click xypolrer tab in taskbar(ontop Xyplorer windows) to see message

Re: Request, popupnested()

Posted: 10 Jan 2017 14:54
by highend
I'm not sure what you actually want...

Do you want to bring XY to the top of all windows when you've send a WM_COPYDATA message with
a xys script that contains a msg, echo, text, etc.?

You can do that in the autoit script...

Code: Select all

$script = ":: msg Hi"
$wm_copydata = 74
$hwnd = WinGetHandle("[CLASS:ThunderRT6FormDC]")
WinSetOnTop($hwnd, "", 1)
WinSetOnTop($hwnd, "", 0)
$dwdata = 4194305
$isize = StringLen($script)
$pmem = DllStructCreate("wchar[" & $isize & "]")
DllStructSetData($pmem, 1, $script)
$pcds = DllStructCreate("dword;dword;ptr")
DllStructSetData($pcds, 1, $dwdata)
DllStructSetData($pcds, 2, ($isize * 2))
DllStructSetData($pcds, 3, DllStructGetPtr($pmem))
DllCall("user32.dll", "lresult", "SendMessageW", "hwnd", $hwnd, "uint", $wm_copydata, "wparam", 0, "lparam", DllStructGetPtr($pcds))


Re: Request, popupnested() / popupmenu()

Posted: 11 Jan 2017 10:53
by edyyus
I mean just "Just show menu, echo, msg, input or text windows ontop(like using autoit)" not (with) main Xyplorer windows.

generaly i don't much understand how software work, i think can't do with Xyplorer(or Don do something)
i don't know much about cript language, just learn create xys xplorer script

Now, on the way to learn autoit3 script (autohotkey and other language)

Thank highend for respone

Re: Request, popupnested() / popupmenu()

Posted: 11 Jan 2017 10:57
by highend
Those message boxes from XYplorer's script commands are modal (you can't display them without seeing XY's own window).

Re: Request, popupnested() / popupmenu()

Posted: 11 Jan 2017 11:25
by edyyus
highend wrote:Those message boxes from XYplorer's script commands are modal (you can't display them without seeing XY's own window).
It work, Xy plorer windows must minimized on taskbar,
i miss test, i test in Xyplorer windows not ontop(not minimized)

can make Xyplorer windows not ontop(not minimized) work to?
and how to seting window position?, msg windows show in top left(x=0 y=0)

Re: Request, popupnested() / popupmenu()

Posted: 11 Jan 2017 11:37
by highend
Xyplorer windows not ontop(not minimized) work to?
That would require changing modal to non-modal windows. Don't know if Don really wants this...
and how to seting window position?
You should do that within your autoit / ahk code

Re: Request, popupnested() / popupmenu()

Posted: 11 Jan 2017 13:00
by edyyus
Xyplorer windows not ontop(not minimized) work to?
Soved, i add WinSetState ($hwnd, "",@SW_MINIMIZE) in script, before dllcall

Code: Select all

$script = ":: text Hi"
$wm_copydata = 74
$hwnd = WinGetHandle("[CLASS:ThunderRT6FormDC]")
WinSetState ($hwnd, "",@SW_MINIMIZE)
WinSetOnTop($hwnd, "", 1)
WinSetOnTop($hwnd, "", 0)
$dwdata = 4194305
$isize = StringLen($script)
$pmem = DllStructCreate("wchar[" & $isize & "]")
DllStructSetData($pmem, 1, $script)
$pcds = DllStructCreate("dword;dword;ptr")
DllStructSetData($pcds, 1, $dwdata)
DllStructSetData($pcds, 2, ($isize * 2))
DllStructSetData($pcds, 3, DllStructGetPtr($pmem))
DllCall("user32.dll", "lresult", "SendMessageW", "hwnd", $hwnd, "uint", $wm_copydata, "wparam", 0, "lparam", DllStructGetPtr($pcds))
highend wrote:
and how to seting window position?
You should do that within your autoit / ahk code
I forget to tell, i using text commad, if using msg, windows show in center,
but both, can't find way to set windows position(yet)
highend wrote:That would require changing modal to non-modal windows. Don't know if Don really wants this.
???
i hope Don don't care about code above.

Why i ned this?, i try using Xyplorer function with my text editor to easy run script, (make)show tooltip or open/explorer file
Xyplorer very usefull windows explorer! and maybe usefull using with other software allow run argument

Thank for your help

Re: Request, popupnested() / popupmenu()

Posted: 11 Jan 2017 13:43
by highend
can't find way to set windows position
WinMove()

Re: Request, popupnested() / popupmenu()

Posted: 11 Jan 2017 15:24
by edyyus
highend wrote:
can't find way to set windows position
WinMove()
WinMove ($hwnd, "", 100, 100, 500, 300, 1)
I try, Not work

I using Editplus
Now can test Script and show Menu like FolderMenu3 EX smothly
Waiting column separator and (optional) Maximum Width columns from Don
Sample autoit.gif
Sample autoit.gif (607.33 KiB) Viewed 4081 times
Sample User Button 1: For Test Seleted Or Whole Script Button
$(Copy) : Copy seleted to clipbord argument in editplus,
if noting selected, editplus copy whole word in current page to clipbord
Command : E:\!Prog\Au3\AutoIt3.exe
Argument : $(Copy) E:\!Prog\Au3\SciTE\_Tools\_OtherTools\_EditPlus-RunXyplorerScript.au3

Code: Select all

$script = "::"&ClipGet()
ClipPut("")
$wm_copydata = 74
$hwnd = WinGetHandle("[CLASS:ThunderRT6FormDC]")
WinSetState ($hwnd, "",@SW_MINIMIZE)
WinSetOnTop($hwnd, "", 1)
WinSetOnTop($hwnd, "", 0)
$dwdata = 4194305
$isize = StringLen($script)
$pmem = DllStructCreate("wchar[" & $isize & "]")
DllStructSetData($pmem, 1, $script)
$pcds = DllStructCreate("dword;dword;ptr")
DllStructSetData($pcds, 1, $dwdata)
DllStructSetData($pcds, 2, ($isize * 2))
DllStructSetData($pcds, 3, DllStructGetPtr($pmem))
DllCall("user32.dll", "lresult", "SendMessageW", "hwnd", $hwnd, "uint", $wm_copydata, "wparam", 0, "lparam", DllStructGetPtr($pcds))
Compile Versions
EditPlus-RunXyplorerSelectedScript.7z
(392.54 KiB) Downloaded 182 times
If Using Compile exe
Command : E:\Your\Path\EditPlus-RunXyplorerSelectedScript.exe
Argument : $(Copy)



Sample User Button 2, Run xys Script Button, like show Menu like FolderMenu3 EX
Command : E:\!Prog\Au3\AutoIt3.exe
Command : E:\!Prog\Au3\SciTE\_Tools\_OtherTools\_EditPlus-RunXyplorerScript2.au3

change path for $sFilePath to your script

Code: Select all

#include <FileConstants.au3>
#include <MsgBoxConstants.au3>

Local Const $sFilePath = "E:\!XYplorerData\Data[7]\Scripts\iMenu\X1iMenu0.xys"
Local $hFileOpen = FileOpen($sFilePath, $FO_READ)
If $hFileOpen = -1 Then
  MsgBox($MB_SYSTEMMODAL, "", "An error occurred when reading the file.")
  Exit
EndIf

$script = "::"&FileRead($hFileOpen)
FileClose($hFileOpen)
$wm_copydata = 74
$hwnd = WinGetHandle("[CLASS:ThunderRT6FormDC]")
WinSetState ($hwnd, "",@SW_MINIMIZE)
WinSetOnTop($hwnd, "", 1)
WinSetOnTop($hwnd, "", 0)
$dwdata = 4194305
$isize = StringLen($script)
$pmem = DllStructCreate("wchar[" & $isize & "]")
DllStructSetData($pmem, 1, $script)
$pcds = DllStructCreate("dword;dword;ptr")
DllStructSetData($pcds, 1, $dwdata)
DllStructSetData($pcds, 2, ($isize * 2))
DllStructSetData($pcds, 3, DllStructGetPtr($pmem))
DllCall("user32.dll", "lresult", "SendMessageW", "hwnd", $hwnd, "uint", $wm_copydata, "wparam", 0, "lparam", DllStructGetPtr($pcds))

Re: Request, popupnested() / popupmenu()

Posted: 11 Jan 2017 15:34
by highend
Your $hwnd points to the handle of the main XY window, not to (new) modal window that your XY script generated^^

Regarding the first autoit script: I don't get it...
You're sending the content of the clipboard to XY?
For what reason?

Re: Request, popupnested() / popupmenu()

Posted: 11 Jan 2017 16:13
by edyyus
highend wrote:Your $hwnd points to the handle of the main XY window, not to (new) modal window that your XY script generated^^
$hwnd2 = WinGetHandle("[CLASS:#32770]")
WinMove ($hwnd2, "", 100, 100, 500, 300, 1)
i try get second $hwnd2 from (new) modal window / msg and text windows(After Dllcall)
, using title, class, text or using again [CLASS:ThunderRT6FormDC]
Not work
highend wrote:Regarding the first autoit script: I don't get it...
You're sending the content of the clipboard to XY?
For what reason?
Thanks, and for your help
button 1 :test/building script button, just for easy test/run
I send to clipbord because i want test seleted script,
select, if i want run just seleted script or i not select if i want run whole script.

if you mean why not using autoit commad
i dont know(yet) how to sending seleted word in editplus to autoit
i think dificult and can't find(yet) correct autoit command to do

Re: Request, popupnested() / popupmenu()

Posted: 12 Jan 2017 10:51
by highend
Are you sure that you don't have any running applications / running scripts in the background,
that automatically move the text script command's window? On all my systems this window
will always be displayed centered on the current display, not in any corner of it...

Apart from that you'll have problems to move it via autoit. Afaik it doesn't support multithreading
and the code you're using will wait until XY returns from the WM_COPYDATA command -> You
can't scan for the correct hwnd for the text / echo / msg... window during that time...

Re: Request, popupnested() / popupmenu()

Posted: 12 Jan 2017 14:33
by edyyus
highend wrote:Are you sure that you don't have any running applications / running scripts in the background,
that automatically move the text script command's window? On all my systems this window
will always be displayed centered on the current display, not in any corner of it...
i sure don't have any running scripts in in the background
I test paralel xys popup window command,
Just msg and inputfolder show in center, echo, text, inputselect and inputfile show in top left

highend wrote:Apart from that you'll have problems to move it via autoit. Afaik it doesn't support multithreading
and the code you're using will wait until XY returns from the WM_COPYDATA command -> You
can't scan for the correct hwnd for the text / echo / msg... window during that time...
i try get hwnd (new) modal window with Au3Info.exe like title or class, noting diffrent
How to i pass it, not wait, that mean affter dllcall i can using like WinWaitActive and WinGetHandle
I realy don't know much about autoit comaand
btw i think ok before find way to do

i using sendkey Ctrl+c (copy to clipbord), i think can using with most editor allow run argument
and i post in Script Exchange to share with other forumer
http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=16886