Sign in to follow this  
Followers 0
Ayres

Select element in Start Menu

11 posts in this topic

:) 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 !

Share this post


Link to post
Share on other sites



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 ?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Try

$PifPath = 'EnterPathHere'
Run(@ComSpec & ' /c "' & $PifPath  & '"','',@SW_HIDE)

Edited by bshoenhair

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by bshoenhair

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

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