Ayres Posted April 12, 2005 Posted April 12, 2005 As I make so that the AUTOIT opens the START menu and "click" on an item with definite name (Sample: DESLG98) independent of the position of it in the START menu? Thanks for all !
bshoenhair Posted April 12, 2005 Posted April 12, 2005 Not sure why you want to open an item from the start menu, maybe I am missing something. What is this "DESLG98" you are trying to open ?
Ayres Posted April 12, 2005 Author Posted April 12, 2005 Not sure why you want to open an item from the start menu, maybe I am missing something.What is this "DESLG98" you are trying to open ?<{POST_SNAPBACK}>It is an archive PIF that restarts the Windows in MSDOS mode and executes a program that only informs that the computer can be off. Use today this resource for computers with Windows 98 that present problems to turn off.
bshoenhair Posted April 12, 2005 Posted April 12, 2005 (edited) Try$PifPath = 'EnterPathHere' Run(@ComSpec & ' /c "' & $PifPath & '"','',@SW_HIDE) Edited April 12, 2005 by bshoenhair
Ayres Posted April 12, 2005 Author Posted April 12, 2005 Try$PifPath = 'EnterPathHere' Run(@ComSpec & ' /c "' & $PifPath & '"','',@SW_HIDE)<{POST_SNAPBACK}>Already I tried this method, but it does not function. The AUTOIT does not restart the Windows, only execute the file PIF in second plain. However, if I make one click on the archive pif, it I restart as I desire.
bshoenhair Posted April 12, 2005 Posted April 12, 2005 (edited) Already I tried this method, but it does not function. The AUTOIT does not restart the Windows, only execute the file PIF in second plain. However, if I make one click on the archive pif, it I restart as I desire.<{POST_SNAPBACK}>Thats odd, it should work, if you must click it then open the start menu via Send keys then use ControlListView to select the proper "PIF" then use {ENTER] from Send to open.Strapped for time right now got to go, good luck. Edited April 12, 2005 by bshoenhair
Ayres Posted April 12, 2005 Author Posted April 12, 2005 Thats odd, it should work, if you must click it then open the start menu via Send keys then use ControlListView to select the proper "PIF" then use {ENTER] from Send to open.Strapped for time right now got to go, good luck.<{POST_SNAPBACK}>I do not know to use the ControlListView function. You have an example I to examine?
bshoenhair Posted April 12, 2005 Posted April 12, 2005 For example look herehttp://www.autoitscript.com/forum/index.ph...ControlListView
Ayres Posted April 12, 2005 Author Posted April 12, 2005 For example look herehttp://www.autoitscript.com/forum/index.ph...ControlListView<{POST_SNAPBACK}>How I open way AUTOIT a folder "C:\Tmp" and execute a specific archive inside of it, using controlclick?
bshoenhair Posted April 13, 2005 Posted April 13, 2005 How I open way AUTOIT a folder "C:\Tmp" and execute a specific archive inside of it, using controlclick?<{POST_SNAPBACK}>Not ControlClick, look at the following Example.This example will create a test.txt file in the Temp dir, then open the temp dir, select the test.txt file and open it. Opt("WinTitleMatchMode",2) FileWrite(@TempDir & '\test.txt','Hello, this is a test file') $WinTitle = 'Temp' $WinText = '' $FileName = 'test.txt' Run('explorer ' & @TempDir) WinWait($WinTitle) $NameIndex = ControlListView($WinTitle,$WinText,'SysListView321',"FindItem",$FileName) If $NameIndex <> -1 Then ControlListView($WinTitle,$WinText,'SysListView321',"Select",$NameIndex) ControlSend($WinTitle,$WinText,'SysListView321','{ENTER}') Else MsgBox(0,'Not Found',$FileName & ' was not found.') EndIf
Ayres Posted April 13, 2005 Author Posted April 13, 2005 Not ControlClick, look at the following Example.This example will create a test.txt file in the Temp dir, then open the temp dir, select the test.txt file and open it. Opt("WinTitleMatchMode",2) FileWrite(@TempDir & '\test.txt','Hello, this is a test file') $WinTitle = 'Temp' $WinText = '' $FileName = 'test.txt' Run('explorer ' & @TempDir) WinWait($WinTitle) $NameIndex = ControlListView($WinTitle,$WinText,'SysListView321',"FindItem",$FileName) If $NameIndex <> -1 Then ControlListView($WinTitle,$WinText,'SysListView321',"Select",$NameIndex) ControlSend($WinTitle,$WinText,'SysListView321','{ENTER}') Else MsgBox(0,'Not Found',$FileName & ' was not found.') EndIf<{POST_SNAPBACK}>Thanks, my friend. With its last example, more detailed, I obtained to finish the program that was making. He forgives me for my precarious English.
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