roberttz Posted July 7, 2010 Share Posted July 7, 2010 (edited) Hi everyone,I am a beginner with AutoIt, so I need your help.I searched helpfile (control description and Tray function) and googled different links about AutoIT, but I couldn't find the answer.I need to make a simple script, which will:1. Run program from a Window system tray (same as I would twice double-clik left mouse on the icon).2. After that main program window will appear (to be specific LANView application), where I need to click "Start" button on the left section (see attached link to screenshot).3. Minimize program, which returns to icon on taskbar.Below I attach screenshot from the program overview (ommit some polish comment text on the picture)ScreenOn the screen in the the left side with blue background and buttons I have collected some usefull information with AutoIt v3 Window Info:expandcollapse popup>>>> Window <<<< Title: LANView 3.1.0 - TSRh Team Class: TfrmMain Position: -8, -8 Size: 1296, 786 Style: 0x17CF0000 ExStyle: 0x00010100 Handle: 0x00070800 >>>> Control <<<< Class: TJvOutlookBar Instance: 1 ClassnameNN: TJvOutlookBar1 Name: Advanced (Class): [CLASS:TJvOutlookBar; INSTANCE:1] ID: 329370 Text: Position: 0, 64 Size: 129, 660 ControlClick Coords: 36, 258 Style: 0x54000000 ExStyle: 0x00000000 Handle: 0x0005069A >>>> Mouse <<<< Position: 36, 342 Cursor ID: 0 Color: 0xA6CAF0 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< 192.168.1.3 (255.255.255.248) ActionMainMenuBar1 Traffic Monitor: Done TabSheet6 >>>> Hidden Text <<<< Search 300 7 1 168 192 0 1 168 192 Adapter 10 TabSheet9 TabSheet8 TabSheet7 TabSheet5 Statisticand also from my taskbar in Windows Vista:expandcollapse popup>>>> Window <<<< Title: Class: Shell_TrayWnd Position: 0, 770 Size: 1280, 30 Style: 0x96000000 ExStyle: 0x00000088 Handle: 0x0002003C >>>> Control <<<< Class: ToolbarWindow32 Instance: 1 ClassnameNN: ToolbarWindow321 Name: Advanced (Class): [CLASS:ToolbarWindow32; INSTANCE:1] ID: 1504 Text: Obszar powiadomień Position: 1134, 4 Size: 36, 26 ControlClick Coords: 7, 13 Style: 0x56008B4D ExStyle: 0x00000080 Handle: 0x0001007A >>>> Mouse <<<< Position: 1141, 787 Cursor ID: 0 Color: 0x007A00 >>>> StatusBar <<<< >>>> ToolsBar <<<< 1: 3 LANView 2: 2 New updates available 3: 1 COMODO Internet Security Premium 4: 0 Bluetooth Device >>>> Visible Text <<<< 23:54 Obszar powiadomień Obszar kontroli systemu Quick Launch Running application Running application >>>> Hidden Text <<<<I was thinking about use Au3recorded to capture my mouse movement+ hotkeyset, but actually It won't work as I want it,because I need to lauch this script on 5-6 computers with different: screen resolution, taskbar icon placement etc. So all in all the script wouldn't be accurate and working properly. Please help me. Edited July 7, 2010 by roberttz Link to comment Share on other sites More sharing options...
Negative1 Posted July 7, 2010 Share Posted July 7, 2010 (edited) Hello, I think I can help with the first and the last part. I cant get the screen shot so second part I can only speculate on. Step 1: WinSetState("LabView Title Here","",@SW_MAXIMIZE) ^^^^even though its not a traditional window the process is still running and you can maximize it. Just insert the title of the Labview window. Step 2: You will have to get the control ID (if there is one) of the start button on the labview page. if there isn't a control ID or you don't know how to get it reply. Step 3: WinSetState("LabView Title Here","",@SW_MINIMIZE) *Edit: Let's all pretend I typed LanView Edited July 7, 2010 by Negative1 What are we going to do tonight Brain?Same thing we do every night Pinky try to automate the world. Link to comment Share on other sites More sharing options...
roberttz Posted July 7, 2010 Author Share Posted July 7, 2010 Thanks for your help.Step 1 and 3At first I figured out that WinSetState function might be good, but I've made small missspell (added one more space between arguments),so I thought it was not working at all. Glad to know that I was wrong:) You will have to get the control ID (if there is one) of the start button on the labview page. if there isn't a control ID or you don't know how to get it reply.No I don't, can you explain furher so I can make it. Link to comment Share on other sites More sharing options...
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