Jump to content
Sign in to follow this  
expertD

Can anyone help me in these very basic problems

Recommended Posts

expertD

[Problem1]

I am beginner with autoIt. I am trying with following code but it is not working properly. Here file vlc-2.0.6-win32.exe is present in the same directory. First two lines works fine but the Send is not working. Can any one tell me why.
Run("vlc-2.0.6-win32.exe")
WinWaitActive("Installer Language")
Send("{ENTER}")

 

[Problem2]

what is diference in below 2 statements.
Run("winzip1006595.exe")
ShellExecute("winzip1006595.exe")
Here file winzip1006595.exe is present in the same directory. Here with the ShellExecute function file executes properly however by Run function it does not get executed. Why?

Share this post


Link to post
Share on other sites
Melba23

expertD,

Your problem 2:

As explained in the Help file Run requires the full path - if the folder in which your script and the zip file is not on the path as set in the Windows environment then it will not find it. But ShellExecute asks Windows what to do with files of that type (extension) and so the zip file runs even though it is not on the path. :)

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
abberration

In case you are not aware, you can use silent switches to install most programs without interaction.

Example:

Run("vlc-2.0.6-win32.exe /S")

RAID Calculator | Software Installer

The truth has been suppressed since the dawn of time.

Share this post


Link to post
Share on other sites
expertD

If you manually click "Enter" when the "Installer Language" pops up, does it go to the next screen?

 

Also:

http://www.autoitscript.com/autoit3/docs/functions/Run.htm

http://www.autoitscript.com/autoit3/docs/functions/ShellExecute.htm

Thanks for the reply Shrapnel

Yes when I manually click "Enter" then it goes to next screen. But with the Send command it is not working.

If you wish you can also download same version of VLC from below link and and check yourself.

http://download.videolan.org/pub/videolan/vlc/2.0.6/win32/vlc-2.0.6-win32.exe

Share this post


Link to post
Share on other sites
expertD

Thanks Melba 23; I got it.

Share this post


Link to post
Share on other sites
expertD

@abberration; I know it, but I don't want silent install.

Share this post


Link to post
Share on other sites
expertD

[Problem3]

I am trying to delete a shortcut from desktop as below. But its not working. Can anyone suggest me why?
FileDelete(@DesktopDir&""&"File Name.lnk")

Share this post


Link to post
Share on other sites
Shrapnel

expertD,

This should get you started....

Tip: Use the Autoit Window Info tool to find out information about the windows your are trying to automate

Local $VLC_Installer_PID = Run("vlc-2.0.6-win32.exe")
Local $VLC_Installer_HWND = WinWaitActive("VLC media player 2.0.6 Setup")
ControlClick($VLC_Installer_HWND, "", "[CLASS:Button; TEXT:&Next >]", "left", 1)

Share this post


Link to post
Share on other sites
expertD

[Problem4]

I want to change window explorer settings like enabling or disabling taskbar etc. Can someone give me some idea that how it can be implemented through autoIt.

Share this post


Link to post
Share on other sites
BrewManNH

You need to use the search function and the help file for some of these questions.

  • Like 1

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
expertD

@BrewManNH, Thanks for suggestion, but I already tried with help file, but unable to find any useful solution for my problems that why I posted them here.

Share this post


Link to post
Share on other sites
BrewManNH

Did you use the search on the forum? Because I'm sure #4 has been asked and answered a few times already. #3 is pretty basic, but you give absolutely no information so no one can suggest anything to you. #2 could have been, as explained to you already, easily fixed if you had read the help file you said you had.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
expertD

Yaa may be my questions are very basic. But I am having problem with them, that's why I asked them here.

Also I searched for [Problem 4] but unable to find any useful solution. And It will be great If you either give some useful solution here or give me some link of previously asked questions. Thanks

Share this post


Link to post
Share on other sites
expertD

 

expertD,

This should get you started....

Tip: Use the Autoit Window Info tool to find out information about the windows your are trying to automate

Local $VLC_Installer_PID = Run("vlc-2.0.6-win32.exe")
Local $VLC_Installer_HWND = WinWaitActive("VLC media player 2.0.6 Setup")
ControlClick($VLC_Installer_HWND, "", "[CLASS:Button; TEXT:&Next >]", "left", 1)

 

I have modified your code as below to suit my needs, but still its not working

Run("vlc-2.0.6-win32.exe")

Local $VLC_Installer_HWND = WinWaitActive("Installer Language")

ControlClick($VLC_Installer_HWND, "", "[CLASS:Button; INSTANCE=1]", "left", 1)

Still I have know Idea why it is happening. Also try to solve my other problems. Thanks

Share this post


Link to post
Share on other sites
expertD

[Problem3]

I am trying to delete a shortcut from desktop as below. But its not working. Can anyone suggest me why?

FileDelete(@DesktopDir&""&"File Name.lnk")

 

Still I am unable to delete shortcut from desktop. Help me.

Share this post


Link to post
Share on other sites
Melba23

expertD,

Could I ask that you stick to one question per thread in future please - we do not mind you having several threads on the go at once. That way we do not have to scroll through the whole thread to work out what has been asked and which have been answered. ;)

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
expertD

@Melba23: Ok, from now I will be making a new thread for each new problem. :lmao:

Share this post


Link to post
Share on other sites
Jos

Still I am unable to delete shortcut from desktop. Help me.

Works fine here with this example so you will have to check your filenames or tell us what you are doing exactly.

FileCreateShortcut(@WindowsDir & "\explorer.exe", @DesktopDir & "\ShortcutExample.lnk", @WindowsDir, "/e,c:\", "Tooltip description of the shortcut.", @SystemDir & "\shell32.dll", "^!t", "15", @SW_MINIMIZE)
Sleep(5000)
FileDelete(@DesktopDir & "\ShortcutExample.lnk")

Jos

  • Like 1

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
expertD

Works fine here with this example so you will have to check your filenames or tell us what you are doing exactly.

FileCreateShortcut(@WindowsDir & "\explorer.exe", @DesktopDir & "\ShortcutExample.lnk", @WindowsDir, "/e,c:\", "Tooltip description of the shortcut.", @SystemDir & "\shell32.dll", "^!t", "15", @SW_MINIMIZE)
Sleep(5000)
FileDelete(@DesktopDir & "\ShortcutExample.lnk")

Jos

 

Yaa its working now for me thanks. Also kindly try to solve my [Problem 2] and [Problem 4] above. Thanks once again.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×