expertD Posted October 3, 2013 Share Posted October 3, 2013 [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? Link to comment Share on other sites More sharing options...
Shrapnel Posted October 3, 2013 Share Posted October 3, 2013 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 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 3, 2013 Moderators Share Posted October 3, 2013 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
abberration Posted October 3, 2013 Share Posted October 3, 2013 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") Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
expertD Posted October 3, 2013 Author Share Posted October 3, 2013 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 Link to comment Share on other sites More sharing options...
expertD Posted October 3, 2013 Author Share Posted October 3, 2013 Thanks Melba 23; I got it. Link to comment Share on other sites More sharing options...
expertD Posted October 3, 2013 Author Share Posted October 3, 2013 @abberration; I know it, but I don't want silent install. Link to comment Share on other sites More sharing options...
expertD Posted October 3, 2013 Author Share Posted October 3, 2013 [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") Link to comment Share on other sites More sharing options...
Shrapnel Posted October 3, 2013 Share Posted October 3, 2013 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) Link to comment Share on other sites More sharing options...
expertD Posted October 3, 2013 Author Share Posted October 3, 2013 [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. Link to comment Share on other sites More sharing options...
BrewManNH Posted October 3, 2013 Share Posted October 3, 2013 You need to use the search function and the help file for some of these questions. Shrapnel 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 GudeHow 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 Link to comment Share on other sites More sharing options...
expertD Posted October 3, 2013 Author Share Posted October 3, 2013 @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. Link to comment Share on other sites More sharing options...
BrewManNH Posted October 3, 2013 Share Posted October 3, 2013 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 GudeHow 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 Link to comment Share on other sites More sharing options...
expertD Posted October 4, 2013 Author Share Posted October 4, 2013 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 Link to comment Share on other sites More sharing options...
expertD Posted October 4, 2013 Author Share Posted October 4, 2013 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 Link to comment Share on other sites More sharing options...
expertD Posted October 4, 2013 Author Share Posted October 4, 2013 [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. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 4, 2013 Moderators Share Posted October 4, 2013 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
expertD Posted October 4, 2013 Author Share Posted October 4, 2013 @Melba23: Ok, from now I will be making a new thread for each new problem. Link to comment Share on other sites More sharing options...
Developers Jos Posted October 4, 2013 Developers Share Posted October 4, 2013 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 expertD 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
expertD Posted October 4, 2013 Author Share Posted October 4, 2013 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. Link to comment Share on other sites More sharing options...
Recommended Posts