Jump to content

Search the Community

Showing results for tags 'shellexecute'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum
  • AutoIt

Calendars

  • Community Calendar

Found 22 results

  1. Is this possible with autoit? What I want to do: Create a Desctop windows shortcut to run an executable application created with autoit, which shortcut would have some parameters which will send as a variable to the aplicagion . For example: Create an app : ExampleAppCreatedByAutoit.exe Run this with a shortcut which has: "C:/ExampleAppCreatedByAutoit.exe" -option1 What I want to do is the ExampleAppCreatedByAutoit.exe take the option1 and do something like this: Shellexecute("c:\myfolder\option1.exe") Can I do that? Thanks,
  2. Hello, for a script to display PDF files I'd like to simply use the default program for PDF files, so I used "ShellExecute(<pdf-file-full-path>)" to open these files. The result for *SOME* of the workstations is, that the Adobe Reader starts up with asking for its language. (English/German). When starting AcroRd32.exe through "ShellExecute()", this "choose your language" dialog is showing up *ALWAYS*. Just to have mentioned it: Process Explorer is presenting this command line, it looks the same for both, PCs with and without that question "Choose Language? [English|German]" "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" --channel=4680.0.860715181 --type=renderer "\\pc0009\Y_DRV_H\Daten\TIF\08\32\G000110832_Freigegeben.idw.pdf" The next approach I thought of was to use Foxit Portable (instead of Acrord32.exe), started from a Network Drive, but it's starting up ugly slowly... So I tried to "Run()" instead to "ShellExecute()" the Adobe Reader. Now the result looks more stange, the "select your language" dialog shows up every now and then, but not always for the Win7 installations affected. If I place a "msgbox()" just in front of the "run()" command, it seems never to show this "select your language" dialog. If I take out this MsgBox() the "select your language" dialog shows up sometimes. When I "ClipPut()" the run command prior the "Run()" and paste that one to a CMD box, then it seems to *NEVER* happen, that this "select your language" dialog shows up. "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" "\\pc0009\Y_DRV_H\Daten\TIF\08\32\G000110832_Freigegeben.idw.pdf" $AcroRead='"C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe"' $PDF='"Y:\Temp\DRV_H\Daten\TIF\33\85\153385_Freigegeben.dwg.pdf"' MsgBox(0,"Values",$AcroRead & @CRLF & $PDF,1) $MyCommand=$AcroRead & " " & $PDF ClipPut($MyCommand) Run($MyCommand) It looks like, that this "--channel=... --type=renderer" parameters are always fact for the AcroRd32.exe instance, that is opening the PDF to be displayed. The Instance opening the "PDF Display GUI" seems to always be a child process of another AcroRd32.exe process. Any clue, what's going on "backstage" here? How to avoid this "Choose your language" dialog? Or maybe someone can mention a different "portable" PDF viewer, I could use for this purpose? Any suggestions appreciated, regards, Rudi.
  3. Hi~ I have some question about how to enable the test mode via "Run" or "shellexecute" of command, was to tried : ----- Run("bcdedit.exe /-set testsinging on", "C:\Windows\System32") and shellexecute("bcdedit.exe /-set testsinging on", "C:\Windows\System32") ----- since this command must to run through administrator competence, have any method can accomplish it?
  4. Hello all, I've been trying to figure out how to launch Google Chrome in the background (hidden) but it doesn't seem possible. I've tried the following methods: ShellExecute("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", "", "", "", @SW_HIDE) Also I've tried: ShellExecute(@ComSpec, "/c start chrome.exe","","",@SW_HIDE) Lastly I tried: RunWait('"'&@ProgramFilesDir&'\Google\Chrome\Application\chrome.exe" --silent-launch',@ScriptDir) But all of them launch my chrome browser without hiding it. Does anyone know a workaround for this or if AutoIT just can't Chrome? Bonus points if you know how to make it launch chrome hidden and make it go to https://www.autoitscript.com Thank you, Brian
  5. How to get the result of the command? My code : Local $iRc = ShellExecute ( "G:\ffmpeg\bin\ffmpeg.exe" , "-version" , "G:\ffmpeg\bin\") ProcessWaitClose($iRc) $Message = StdoutRead($iRc)
  6. I want to run a python script from autoit. I know we can do this with shellexecute or run , but this python script takes 3 cmd line arguments. How to pass them from autoit script? I tried many ways. Following solution also not working e.g. RunWait( 'fullpath\Python.exe Scriptpath\ReadLog.py  -f "file.log" -k "key" -e "errMsg" ') Found solution: RunWait( 'fullpath\Python.exe ReadLog.py -f "file.log" -k "key" -e "errMsg" ', 'Working_directory_path') PFB description: https://stackoverflow.com/questions/45757834/how-to-pass-command-line-arguments-to-a-python-script-anyscript-while-executin
  7. Hey Community, cause im too new in the Auto it world i will try it with the your help. hopefully. I woud like to know how i can handle my Problem. ---- I have a Excel Data with 362 random numbers. For Example: 1166642335374 1172899897343 ..... this numbers are a part of the filepath ...example D:\Projekte\1166_64233_5374 as u can see its the first number of the Excel data. After the first 4 numbers it shoud make a "_" than another 5 "_" This is my first question. How can i handle this to make it Shell execute. -------- Second question: If i am in the path. For Example: D:\Projekte\1166_64233_5374 the code shoud search for specific PDF Files. They are named like: 0050569E364B1ED79B900F73E62660EC.pdf the first 15 letters are always the same 0050569E364B1ED when he found this data he has to copy it on a Folder on the Desktop. (There can also be 2 or 3 pdfs in one Folder with this letters) ---- Please give me some help :-)
  8. Hello, What command would I use to open the following folder directories for: Computer/This PC (windows 7/Windows 10) Libraries\documents Libraries\Pictures I know:  Run("Explorer.exe " & $filepath) ShellExecute($filepath) can be used to open folder locations when you type in the full directory such as "C:\Users\%username%\Documents" but I'm trying to figure out how to use these windows short paths. Thanks,
  9. Hi. Local $sPDFtk = FileGetShortName(@ScriptDir & "\pdftk.exe") Local $sInputPDF = FileGetShortName(@ScriptDir & "\Prodis_Test.pdf") Local $sSig_1 = FileGetShortName(@ScriptDir & "\Sig_1.pdf") Local $sTempPDF = FileGetShortName(@ScriptDir & "\Prodis_Test_TEMP.pdf") $iSuccess = ShellExecuteWait($sPDFtk, $sInputPDF & " stamp " & $sSig_1 & " output " & $sTempPDF, "", "", @SW_HIDE) @ScriptDir is "H:\_Conrad lokal\Downloads\AutoIt3\_COX". As you can see there is a space in the path. I know that ShellExecuteWait is working with FileGetShortName at the filename. It seems to me that I can't pass the parameters that way. But without FileGetShortName it's not working too. Ideas? Regards, Conrad
  10. I have 3 processes that I am trying to work with: The ControlCenter (Cannot Edit) and handles the other 2 processes. The ControlCenter will launch and close processes as requested by the user. The Launcher (Can Edit) and launches an installer. The Script (Can Edit) and automates the above installer. My issue is, ControlCenter will terminate the Launcher and all of it's child processes. I need the script to continue running after the Launcher has been closed by the ControlCenter. How do I get the Launcher to launch the script in it's own parent process so it does not get terminated when the ControlCenter terminates the launcher and all child processes? Sorry if this is confusing. I am terrible at explaining things. Autism can be a pain to deal with sometimes.
  11. Hi friends, Suppose MyProgram is a tabbed program, meaning that it allows for opening multiple files in the same instance. I want to open File1, File2 and File3 in one instance of MyProgram from an AutoIT script. How can I do this? I have read the AutoIT Help File about "ShellExecute" and "Run", but I have found nothing helpful. Thanks for reading my question. Any answer would be very appreciated.
  12. Shellexecute / Run error

    Okay, so I have a TCP connection set up over some computers, no problem. I recieve the messages without problem, and when I get a specific message over the server, it runs some program. No problem at first. But then, after the whole script has ran for a while, it won't open any program, not even a web page like ShellExecute("www.google.com"). It just returns @error=1. It's nothing wrong with the path, FileExists makes sure of that (Always returns 1). When I then try using Run instead of ShellExecute, I still get an error. Any idea why it just works at first, but then starts to fail every time? Relevant for opening a specific file: ShellExecute(@DesktopDir & "\Fireplace.mp4") If @error Then FileWrite(@DesktopDir & "\MultiClientMainLog.txt", @MDAY & "." & @MON & "." & @YEAR & " " & @HOUR & ":" & @MIN & " - ShellExecute Error: " & @error & " & Extended: " & @extended & @CRLF) $Exists=FileExists(@DesktopDir & "\Fireplace.mp4") FileWrite(@DesktopDir & "\MultiClientMainLog.txt", @MDAY & "." & @MON & "." & @YEAR & " " & @HOUR & ":" & @MIN & " - Exists: " & $Exists & " & exists error: " & @error & " & Extended: " & @extended & @CRLF);;;;;;;;;;; Run(@DesktopDir & "\Fireplace.mp4") If @error Then FileWrite(@DesktopDir & "\MultiClientMainLog.txt", @MDAY & "." & @MON & "." & @YEAR & " " & @HOUR & ":" & @MIN & " - Run Bål Error: " & @error & " & Extended: " & @extended & @CRLF) EndIfWhole client: #Include <_AudioEndpointVolume.au3> #include <Process.au3> TCPStartup() OnAutoItExitRegister("Terminate") $IPAdress="My personal IP..." $Port= Some IP... Local $Socket Connect() While 1 Sleep(50) Recv() If _IsInternetConnected()=False Then Connect(2) WEnd Func Recv() $Recv=TCPRecv($Socket, 2048) If @error>0 Then Connect(@error & " " & @extended) If $Recv="" Then Return FileWrite(@DesktopDir & "\MultiClientMainLog.txt", @MDAY & "." & @MON & "." & @YEAR & " " & @HOUR & ":" & @MIN & " - Recieved " & $Recv & @CRLF);;;;;;;;;;; $Recv=StringReplace($Recv, @CR, "") CheckForAction($Recv) EndFunc Func Connect($Conn=0) TCPCloseSocket($Socket) FileWrite(@DesktopDir & "\MultiClientMainLog.txt", @MDAY & "." & @MON & "." & @YEAR & " " & @HOUR & ":" & @MIN & " - Connection mode " & $Conn & @CRLF);;;;;;;;;;; TraySetIcon(@ScriptDir & "\icons\offline.ico") Do Sleep(1000) $Socket=TCPConnect($IPAdress, $Port) Until Not @error TraySetIcon(@ScriptDir & "\icons\online.ico") TCPSend($Socket, "ImMain") EndFunc Func CheckForAction($_Recv) If $_Recv="vg" Then ShellExecute("www.vg.no") Return True EndIf If $_Recv="bål" Or $_Recv="bÃ¥l" Then ShellExecute(@DesktopDir & "\Fireplace.mp4") If @error Then FileWrite(@DesktopDir & "\MultiClientMainLog.txt", @MDAY & "." & @MON & "." & @YEAR & " " & @HOUR & ":" & @MIN & " - ShellExecute Error: " & @error & " & Extended: " & @extended & @CRLF) $Exists=FileExists(@DesktopDir & "\Fireplace.mp4") FileWrite(@DesktopDir & "\MultiClientMainLog.txt", @MDAY & "." & @MON & "." & @YEAR & " " & @HOUR & ":" & @MIN & " - Exists: " & $Exists & " & exists error: " & @error & " & Extended: " & @extended & @CRLF);;;;;;;;;;; Run(@DesktopDir & "\Fireplace.mp4") If @error Then FileWrite(@DesktopDir & "\MultiClientMainLog.txt", @MDAY & "." & @MON & "." & @YEAR & " " & @HOUR & ":" & @MIN & " - Run Bål Error: " & @error & " & Extended: " & @extended & @CRLF) EndIf Sleep(1000) Send("f") Return True EndIf If $_Recv="exit" Then Send("{ALTDOWN}{F4}{ALTUP}") Return True EndIf If $_Recv="opp" Then Send("{PGUP}") Return True EndIf If $_Recv="ned" Then Send("{PGDN}") Return True EndIf If $_Recv="endc" Then FileWrite(@TempDir & "\endc.txt", "ok") Return True EndIf If $_Recv="startc" Then FileWrite(@TempDir & "\startc.txt", "ok") Return True EndIf If $_Recv="cbål" Or $_Recv="cbÃ¥l" Then FileWrite(@TempDir & "\endc.txt", "ok") Sleep(3000) ShellExecute(@DesktopDir & "\Fireplace.mp4") Sleep(1000) Send("f") Return True EndIf If StringLeft($_Recv, 3)="cmd" Then _RunDOS(StringTrimLeft($_Recv, 4)) Return True EndIf If StringLeft($_Recv, 3)="au3" Then If FileExists(@TempDir & "\Run.au3") Then FileDelete(@TempDir & "\Run.au3") FileWrite(@TempDir & "\Run.au3", StringTrimLeft($_Recv, 4)) ShellExecute(@TempDir & "\Run.au3") Return True EndIf If Stringleft($_Recv, 10)="set volume" Then _SetMasterVolumeLevelScalar(StringTrimLeft($_Recv, 11)) Return True EndIf If StringLeft($_Recv, 4)="send" Then Send(StringTrimLeft($_Recv, 5)) Return True EndIf If StringLeft($_Recv, 4)="www." Then ShellExecute($_Recv) Return True EndIf Return False EndFunc Func _IsInternetConnected() Local $aReturn = DllCall('connect.dll', 'long', 'IsInternetConnected') If @error Then Return SetError(1, 0, False) Return $aReturn[0] = 0 EndFunc ;==>_IsInternetConnected Func Terminate() TCPShutdown() Exit EndFunc
  13. Hey people. I want to keep running a process executed by the main compiled script after I kill the process, using ProcessKill. The problem is that after killing the parent process, the children is also terminated. I tried using Run, ShellExecute (what I need to run are batch commands BTW). Anyway to prevent this behavior? All I can think of is creating a scheduled task to keep it alive after closing the main one, but it might be unreliable, depending on the system.
  14. Good Afternoon All Let me start by saying... I'm not sure if this belongs in the GUI part of the forum as it's more of a loop / code / dynamic GUI layout issue. I understand if you move it though. I have been doing some crazy things in AutoIT lately and one of them just so happens to be an accidental infinite loop. I am dynamically populating my GUI labels... so that means if I have a users ip address I create $L_PP1_WhoISSearch However, if I assign a function to a non existent label... for instance a user has no ip address or it is invalid, I get an infinite loop / crash. The While loop below just goes crazy running ShellExecute. Since the label $L_PP1_WhoISSearch doesn't exist, the function WhoISSearch() just runs ShellExecute to infinity... What should I do differently??? Is there a trigger I can set in the Gui to ignore missing cases??? Sorry, I can only provide "snippets" of my code since it's for work. Thanks you all!!! ; This is my loop of doom if the $L_PP1_WhoISSearch doesn't exist in my gui. While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $L_PP1_DashboardLink DashboardLink01() Case $L_PP1_WhoISSearch WhoISSearch() Case $B_PP1_BACK02 GUIDelete() Gui01_PP_INC() Case $B_PP1_EXIT02 Exit EndSwitch WEnd Func WhoISSearch() ShellExecute('http://whois.arin.net/rest/nets;q=' & $PP1_SourceIPClick01 & '?showDetails=true&showARIN=false&showNonArinTopLevelNet=false') ;MsgBox (0, "", 'WTF') EndFunc; This is my dynamic label for my Gui. ElseIf $i = 5 Then $L_PP1_SourceIP = GUICtrlCreateLabel($LabelVariable & ' ' & $aArray_Variable_PP_Gui01[$i], 10, $L_PP1_Var_StartHeight, 316, 19) GUICtrlSetFont(-1, 10, 800, 0, "Calibri") $L_PP1_Var_StartHeight += 22 $L_PP1_WhoISSearch = GUICtrlCreateLabel('WhoIS Search: ' & $PP1_SourceIPClick01, 10, $L_PP1_Var_StartHeight, 316, 19) GUICtrlSetFont(-1, 10, 800, 0, "Calibri") GUICtrlSetColor(-1, 0x0000FF) $L_PP1_Var_StartHeight += 22
  15. I created a Launcher script for work, which checks a network drive for the newest version of a Microsoft Access front end file, updates the user's copy if they have an older version, and then launches the newest version. However, each time it's run, new tasks keep showing up in the Task Manager that don't get closed. I've tracked down the problem to the ShellExecute function. ShellExecute("U:\My Documents\Access DB\Test.accdb") I created a script with a single line of code (above) and ran it 10 times. 2 out of 10 times (2nd run and 10th run), the script opened the Test.accdb file and stopped running, as intended. The other 8 times, the Test.accdb file was opened, but the script kept running indefinitely. It just fails to stop running, and doesn't appear to be doing anything. I can add extra lines of code after Shellexecute, like ConsoleWrite("Am I still running?") and it will run that code, but the script will still fail to exit afterwards.. Does anyone know what the problem is, or how I can avoid it?
  16. If I use the ShellExecute() function to access a URL, it opens IE and directs the browser to the page. This method seems to work flawlessly, but I was wondering whether it would be better to open the link using a different method, or if there is a preferred method? If anyone can advise me on this, I'd be grateful. Thanks.
  17. Hey guys, im writing on my project and got some memory leaks. Actual im looking for the leak for a month and now i got some curios results. I wrote some testscripts, to see, if AutoIt causes memory leaks. So i wrote some testscript for Listviews, Lists, and Labels to see, if i create a Listview with lets say 1000 items and delete them, does AutoIt reset the complete memory of these items? i'd say no. I did some tests and got the result that in best case 4K memory is missing ... Testscript #1: Listview created by nature func in combination with UDF funcs to create and delete items. #include #include #include Opt("GUIOnEventMode", 1) Opt("MustDeclareVars", 1) Local $hGUI = GUICreate("GUI", 500, 500) Local $hListview = GUICtrlCreateListView("Column 1", 10, 50, 480, 440) Local $hButton1 = GUICtrlCreateButton("Create 100 Items", 10, 10, 100, 30) Local $hButton2 = GUICtrlCreateButton("Delete All Items", 120, 10, 100, 30) GUISetState(@SW_SHOW, $hGUI) GUICtrlSetOnEvent($hButton1, "_create_items") GUICtrlSetOnEvent($hButton2, "_delall_items") GUISetOnEvent($GUI_EVENT_CLOSE, "_exit") While 1 Sleep(100) WEnd Func _create_items() For $i = 0 To 100 _GUICtrlListView_AddItem($hListview, Random(0, 2000)) Next EndFunc Func _delall_items() _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($hListview)) EndFunc Func _exit() Exit EndFuncTestscript #2: Listview created by UDFfunc in combination with UDF funcs to create and delete items. #include #include #include Opt("GUIOnEventMode", 1) Opt("MustDeclareVars", 1) Local $hGUI = GUICreate("GUI", 500, 500) local $hListview = _GUICtrlListView_Create($hGUI, "Column 1", 10, 50, 480, 440) Local $hButton1 = GUICtrlCreateButton("Create 100 Items", 10, 10, 100, 30) Local $hButton2 = GUICtrlCreateButton("Delete All Items", 120, 10, 100, 30) GUISetState(@SW_SHOW, $hGUI) GUICtrlSetOnEvent($hButton1, "_create_items") GUICtrlSetOnEvent($hButton2, "_delall_items") GUISetOnEvent($GUI_EVENT_CLOSE, "_exit") While 1 Sleep(100) WEnd Func _create_items() For $i = 0 To 100 _GUICtrlListView_AddItem($hListview, Random(0, 2000)) Next EndFunc Func _delall_items() _GUICtrlListView_DeleteAllItems($hListview) EndFunc Func _exit() Exit EndFuncTestscript #3: Creating a list #include <GUIConstantsEx.au3> #include <GuiListView.au3> Opt("GUIOnEventMode", 1) Opt("MustDeclareVars", 1) Local $hGUI = GUICreate("GUI", 500, 500) Local $hList = GUICtrlCreateList("Column 1", 10, 50, 480, 440) Local $hButton1 = GUICtrlCreateButton("Create 100 Items", 10, 10, 100, 30) Local $hButton2 = GUICtrlCreateButton("Delete All Items", 120, 10, 100, 30) GUISetState(@SW_SHOW, $hGUI) GUICtrlSetOnEvent($hButton1, "_create_items") GUICtrlSetOnEvent($hButton2, "_delall_items") GUISetOnEvent($GUI_EVENT_CLOSE, "_exit") While 1 Sleep(100) WEnd Func _create_items() For $i = 0 To 100 GUICtrlSetData($hList, Random(0, 2000)) Next EndFunc Func _delall_items() GUICtrlSetData($hList, "") EndFunc Func _exit() Exit EndFuncTestscript #4: Working with labels. #include #include #include Opt("GUIOnEventMode", 1) Opt("MustDeclareVars", 1) Local $hGUI = GUICreate("GUI", 500, 500) Local $hlabel = GUICtrlCreateLabel("AP's: ", 10, 45, 100, 440) Local $hlabel2 = GUICtrlCreateLabel("AP's: ", 110, 45, 100, 440) Local $hlabel3 = GUICtrlCreateLabel("AP's: ", 210, 45, 100, 440) Local $hlabel4 = GUICtrlCreateLabel("AP's: ", 310, 45, 100, 440) Local $hlabel5 = GUICtrlCreateLabel("AP's: ", 410, 45, 100, 440) Local $hButton1 = GUICtrlCreateButton("Create 100 Items", 10, 10, 100, 30) Local $hButton2 = GUICtrlCreateButton("Delete All Items", 120, 10, 100, 30) GUISetState(@SW_SHOW, $hGUI) GUICtrlSetOnEvent($hButton1, "_create_items") GUICtrlSetOnEvent($hButton2, "_delall_items") GUISetOnEvent($GUI_EVENT_CLOSE, "_exit") While 1 Sleep(100) WEnd Func _create_items() Local $sMsg = "" Local $sMsg2 = "" Local $sMsg3 = "" Local $sMsg4 = "" Local $sMsg5 = "" For $i = 0 To 30 $sMsg = $sMsg & Random(1,200) & @CR $sMsg2 = $sMsg2 & Random(1,200) & @CR $sMsg3 = $sMsg3 & Random(1,200) & @CR $sMsg4 = $sMsg4 & Random(1,200) & @CR $sMsg5 = $sMsg5 & Random(1,200) & @CR Next GUICtrlSetData($hlabel, $sMsg) GUICtrlSetData($hlabel2, $sMsg2) GUICtrlSetData($hlabel3, $sMsg3) GUICtrlSetData($hlabel4, $sMsg2) GUICtrlSetData($hlabel5, $sMsg3) EndFunc Func _delall_items() GUICtrlSetData($hlabel, "") GUICtrlSetData($hlabel2, "") GUICtrlSetData($hlabel3, "") GUICtrlSetData($hlabel4, "") GUICtrlSetData($hlabel5, "") EndFunc Func _exit() Exit EndFunc Got someone a statements for me, if its true? Regards Looked up here: http://www.google.com (Also tried to find out if ShellExecute causes problems) and some more...
  18. I'm trying to get some code working with ShellExecute. I would like the Window to execute hidden, but it does not seem to be working when I set the SW_HIDE flag. Any help is much appreciated. Code below: Local $tmp = "C:\Temp" Local $msi = $tmp & '\AdobeFlash.msi' If Not FileExists($tmp) = 1 Then DirCreate($tmp) InetGet("http://download.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_11_plugin.msi", $msi, 0, 0) $afEXE = ShellExecute("AdobeFlash.msi", "", $tmp, "open", @SW_HIDE) Do $run = ControlClick("Adobe Flash Player 11 Plugin - InstallShield Wizard", "", 1669) Until $run = 1 Do $finish = ControlClick("Adobe Flash Player 11 Plugin - InstallShield Wizard", "", 1653) Until $finish = 1 DirRemove($tmp) Thoughts?
  19. Hi, trying to start an exe with parameters, and making a count while it's executing, like this: Opt("TrayIconDebug", 1) Opt("TrayAutoPause", 0) Opt("TrayOnEventMode", 1) SplashImageOn("Intel", "img\intel.jpg", -1, -1, -1, -1, 1) Sleep(1000) SplashOff() ProgressOn("Progress...", "Working", "0 percent") ;ProgressSet(0, "0 %", "Working") If FileExists("MEI_Intel_XP32_Vista_Win7_6001179\setup.exe") Then ShellExecute("MEI_Intel_XP32_Vista_Win7_6001179\SETUP.EXE", "-s") Count() Else MsgBox(64, "FileExists Function", "Intel MEI .exe not found!", 0) Exit EndIf Func Count() For $i = 0 To 100 Step +1 ProgressSet($i, $i & '%', "Working") If ProcessWaitClose("SETUP.EXE") = 1 Then ProgressSet(100, "100 %", "Done!") Sleep(500) ProgressOff() Exit EndIf Sleep(1000) Next ProgressOff() EndFunc ;==>Count Problem is, it runs until it's finished, and im not using SEWait... :S How can i do this, using parameters, and making the count at the same time? Was thinking about some variables, just a loop, and cheking for some variable to become 1 or something like that, think it could work, but im more interested in why the script doens't just continue... PS: I know i don't need to have the count part as a function, considering the script runs normally.
  20. Well ,sometimes if you try to pen firefox hidden or minimized,doesn't work ,and when it works,you can't show it again on the monitor ShellExecute( "C:\Program Files\Mozilla Firefox\firefox.exe","Google - Mozilla Firefox","","open",@SW_HIDE) Sleep(2000) WinSetState( "Google - Mozilla Firefox","",@SW_SHOW)
  21. Hello passerbys. I want to make a program for my family because they don't understand computer very well. I'd like to make a program to mount Daemon Tools Images to a certain drive. Is there a way to do this? I tried using shellexecute as such: $path = "I:\stuff I put on\Games\Console Games\Sega Saturn Roms\Dragon Force" $name = "DRAGON_FORCE.CUE" ShellExecute($name,"",$path,"Daemon Tools Pro") The reason I tried this is because I have Daemon Tools installed in a way that it appears in the shell menu of certain files when you right click on them. Is this possible?
  22. Hi, i need to control the value in the parameter of shell execute function, because i want to add an edit box so i can change the value to my liking. This a script to change the value of the computer volume by a small fraction with the pgup and pgdn hotkeys. This executes an exe called nircmd, the syntax is "nircmd.exe changesysvolume 250" adds 250 to volume from 0 - 65535 Any solution is welcome GUICreate ("Volume Control", 150, 150, 0, 0) Local $setvol = 0 Local $volup = 1500 Local $voldn = -1500 GUISetState() HotKeySet ("{PGUP}", "voluphk") HotKeySet ("{PGDN}", "voldnhk") GUICtrlCreateEdit ("", "30", "30", "80", "18") Func voluphk() ShellExecute ("nircmd.exe", "changesysvolume $volup", "C:\nircmd") _WinAPI_Beep(1500, 200) EndFunc Func voldnhk() ShellExecute ("nircmd.exe", "changesysvolume $voldn", "C:\nircmd") _WinAPI_Beep(1250, 200) EndFunc Do ToolTip("") Until $setvol = 1
×