Sign in to follow this  
Followers 0
thepaulguy

Two Scripts One GUI

7 posts in this topic

Can you have 2 scripts working with one GUI?

For Example:

Script1.au3 creates a GUI with a listview.

Script2.au3 adds a listview item to the listview in the GUI that was created by Script1.

Share this post


Link to post
Share on other sites



thepaulguy,

My first thought: why not combine the 2 scripts and make the entire question moot? :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

LOLOL! OK???? This is why.

So, anyway back to this topic, can it be done?

Share this post


Link to post
Share on other sites

thepaulguy,

In principle I see no reason why not. You could use the _GUICtrlListView_* functions to add the items directly or just pass the required ListViewItem text back to the first script.

In either case you would need to find some way of passing the required data between the scripts. I assume they will be compiled so search for "+inter +script +communication" and you will find lots of threads - my personal favourite is trancexx's MailSlot UDF. :)

Good luck - not a project I would want to undertake! ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

I'll look into all these ideals. I am already taking a look at the interscript communication stuff. Hopefully I can just do it directly using the _GUICtrlListView_* commands.

Share this post


Link to post
Share on other sites

I just looked up _GUICtrlListView_ in the Help File. All examples are creating the gui within the same script.

#include <GuiListView.au3>

_GUICtrlListView_AddItem($hWnd, $sText [, $iImage = -1 [, $iParam = 0]])

How can I assign $hwnd to GUI from another script?

Share this post


Link to post
Share on other sites

thepaulguy,

How can I assign $hwnd to GUI from another script?

And therein lies the problem. Just as well you said: ;)

I am already taking a look at the interscript communication stuff

I was absolutely serious when I said I would not want to try doing this, so please do not expect a massive amount of help from me in trying to get it to work - I am not completely convinced that it ever will. :)

However, you might like to think of another way of doing this. Why not write the data you want to put into the ListView into a file which can then be read by the other script? seangriffin's FileSystemMonitor UDF will let you monitor when the file is updated and so know when to read in the new data and create the ListView. Might be less complex in the end. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0