pbeh Posted July 7, 2007 Share Posted July 7, 2007 I am new at autoIt, and im trying to build a script that will use iniread to open avi files. But the run function dosent work i ques. *au3 "WEnd Func OnYes() $comboread = GuiCtrlRead($combo_2) If $comboread = "Serier(3)" Then MsgBox(4096, "Tjockboll", "Du valde Serier(3)") Sleep(3000) Run($Serier1) Sleep(1000) Send("{F}") ......................................................... .............................." *ini " [serier1] Serier1=C:\Documents and Settings\Mjuka Men Döda\Mina dokument\- Share -\- Tv-Serier -\Entourage\Säsong 1\Entourage - 101 - Pilot.avi" So if some one is willing to help me that would be werry nice! And please don't wright that i schould search the examples, helpfile, forum nore google. Becasue i have already done that. Link to comment Share on other sites More sharing options...
anixon Posted July 7, 2007 Share Posted July 7, 2007 I am new at autoIt, and im trying to build a script that will use iniread to open avi files. But the run function dosent work i ques. *au3 "WEnd Func OnYes() $comboread = GuiCtrlRead($combo_2) If $comboread = "Serier(3)" Then MsgBox(4096, "Tjockboll", "Du valde Serier(3)") Sleep(3000) Run($Serier1) Sleep(1000) Send("{F}") ......................................................... .............................." *ini " [serier1] Serier1=C:\Documents and Settings\Mjuka Men Döda\Mina dokument\- Share -\- Tv-Serier -\Entourage\Säsong 1\Entourage - 101 - Pilot.avi" So if some one is willing to help me that would be werry nice! And please don't wright that i schould search the examples, helpfile, forum nore google. Becasue i have already done that. Ini data is read from a txt file text the data look like this: [section1] value1 = "this is your information" value2 = "this is any other information" To read an ini file use $info1 = IniRead(@ScriptDir & "\your.ini", "section1", "value1", "99") $info2 = IniRead(@ScriptDir & "\your.ini", "section1", "value1", "99") To display what is read msgbox(0,"Display INI", $info1 & " " & $info2) Ant.. Link to comment Share on other sites More sharing options...
pbeh Posted July 7, 2007 Author Share Posted July 7, 2007 (edited) Ini data is read from a txt file text the data look like this: [section1] value1 = "this is your information" value2 = "this is any other information" To read an ini file use $info1 = IniRead(@ScriptDir & "\your.ini", "section1", "value1", "99") $info2 = IniRead(@ScriptDir & "\your.ini", "section1", "value1", "99") To display what is read msgbox(0,"Display INI", $info1 & " " & $info2) Ant.. So in the *au3 i could have it like i had it before? "Run($Serier1)" but at the top i would have to change it to "$info1 = IniRead(@ScriptDir & "\your.ini", "section1", "value1", "99")" And in the *ini i could have it like i had it?. It wont open the *avi i have tried to do it like you said, i have also tried wrighting a new script exactly like you described it..siterunner.txt Edited July 7, 2007 by pbeh Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted July 7, 2007 Share Posted July 7, 2007 I believe the Run function can only start executable files, try using ShellExecute instead .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
anixon Posted July 7, 2007 Share Posted July 7, 2007 So in the *au3 i could have it like i had it before? "Run($Serier1)" but at the top i would have to change it to "$info1 = IniRead(@ScriptDir & "\your.ini", "section1", "value1", "99")" And in the *ini i could have it like i had it?. It wont open the *avi i have tried to do it like you said, i have also tried wrighting a new script exactly like you described it.. What program is an *.avi file associated with? Ini Text File [section1] value1 = "C:\Documents and Settings\Mjuka Men Döda\Mina dokument\- Share -\- Tv-Serier -\Entourage\Säsong 1\Entourage - 101 - Pilot.avi" Script $info1 = IniRead(@ScriptDir & "\your.ini", "section1", "value1", "99")" Then use the following command ShellExecute(.................. see help) No guarantee that it will work but might help you along the way Ant.. Link to comment Share on other sites More sharing options...
therks Posted July 7, 2007 Share Posted July 7, 2007 I think maybe the documentation for the Run function should have a notice in big letters at the top saying, "Only works on EXECUTABLE FILES (exe, com, scr, etc) for all other files, use ShellExecute!" My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
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