win286 Posted January 10, 2017 Posted January 10, 2017 Hi All, Until now an UI wasn't much more than a file picker, progress bar and splash screen. I'm in the process of learning AutoIt's GUI tools via Koda (1st tool I was able to get to work). Are there any other GUI tools that work? To learn the GUI I've created two forms so far, a tic-tac-toe game and a seperate button menu form to run the game in black&white or in color. Now I want to modify this to work with dual monitors so both see the same thing. Can this be done with AutoIt? And if so, where would I start? TIA,
win286 Posted January 11, 2017 Author Posted January 11, 2017 Hi All, Is it possible to reference an object on one form from a second form? So if I'm on form2 can I connect to form1.button5? TIA
anthonyjr2 Posted January 11, 2017 Posted January 11, 2017 5 hours ago, win286 said: Hi All, Is it possible to reference an object on one form from a second form? So if I'm on form2 can I connect to form1.button5? TIA This all depends on where and how you've defined your variables. If form1 is in scope when you reference it then yes, you can access it from the second. In regards to other GUI tools, Koda is probably the best one you're going to find. A lot of the fancier stuff is easier to control when you do it from code anyway. UHJvZmVzc2lvbmFsIENvbXB1dGVyZXI=
spudw2k Posted January 11, 2017 Posted January 11, 2017 One way you could (how I like to) deal with it, is to define an Array which holds ids/handles of GUI controls/elements and use ENUM CONSTs with names that are meaningful. You can check out my Plasma_kIt post to see what I mean: Main GUI defined starting @ line #34 Pallete Mixer GUI defined starting @ line #73 Plasma Editor GUI defined starting @ line #130 Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
win286 Posted January 12, 2017 Author Posted January 12, 2017 Thanks for the replies... anthonyjr2 - Keeping scope sounds like it may not work reliably in all cases. But good to know. I like Koda for doing the layout. Is there a way to modify the case statement template? At the very least I'd like Koda to generate something like: Case Button1 MyButtonFunc("Button1") Case Button2 MyButtonFunc("Button2") spudw2k - It's like you read my mind, my next question was going to be about using an array. I took a brief look at your example and I'm gonna need to sit for a bit to have any hope of understanding that. I'm gonna setup an array or two and see how it goes? If there are any rules with multiple r/w access to arrays please let me know. Thanks Again.
anthonyjr2 Posted January 12, 2017 Posted January 12, 2017 Koda probably won't do the cases for you. I usually do the same thing as you are, I make the layout in Koda first and then just manually put in all of the code structure. I haven't seen any way to auto-generate them but it could be possible. UHJvZmVzc2lvbmFsIENvbXB1dGVyZXI=
win286 Posted January 27, 2017 Author Posted January 27, 2017 Hi All, Just FYI there are templates in Koda and they are easy to update.... I found them about 30 minutes after I posted. Thanks for the example on the array. My issue ended up being object names, forms are not independent and can not use same name for different objects (such as button1 on 2 diff forms). New question... Is there a way to open or move forms to different desktops now that Windows supports supports multiple desktops? TIA,
win286 Posted January 27, 2017 Author Posted January 27, 2017 Hi All, To clarify my need, I want to open an AutoIt exe and a form or two in the primary/default desktop. Then based on the users button click in the primary desktop, I want to open an additional form in a different desktop that would already be in use by VNC. So far all I've found was how to change settings in another desktop, and how to open a new desktop & launch another exe at the same time. But not how to open a form in an existing alternate desktop from an already running AutoIt exe. Hope someone can help. TIA
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now