Yagel Posted October 3, 2007 Share Posted October 3, 2007 Hey guys, i made a program with this lovley Scrpting Langauge that downloads a song from a site. and i share it at some forum, but people say its opening the Run [ with send("#r") that i did..] and thats it it stoppes. anyone knows why? [ maybe they need some dll filles, net frame work ? or something? ] btw, this is the script: expandcollapse popup#Region #AutoIt3Wrapper_icon=Icon_1.ico #AutoIt3Wrapper_Res_Comment=100FM.co.il Auto Song Downloader #AutoIt3Wrapper_Res_Description=SXHacker #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_LegalCopyright=SXHacker #AutoIt3Wrapper_Res_Language=1037 #EndRegion $szName = InputBox(Default, "הכנס את השם של השיר", "", " M", Default, Default, Default, Default) Switch @error Case 0 Switch $szName Case "a", "b", "c", "d", "e" $msg = "הכנס שם נורמלי בבקשה." Case "QP" $msg = "הכנס שם נורמלי בבקשה." Case "asdf" to "1234" $msg = "הכנס שם נורמלי בבקשה." Case Else Send("#r") WinWaitActive("Run") Send("cmd{ENTER}") sleep(200) Send("@echo off{ENTER}") sleep(150) Send("cls{ENTER}") sleep(150) Send("cd c:\Documents And Settings\%username%\Desktop\{ENTER}") sleep(150) send("cls{ENTER}") sleep(150) send("mkdir 100_FM_Songs{ENTER}") sleep(150) send("cls{ENTER}") sleep(150) send("cd c:\Documents And Settings\%username%\Desktop\100_FM_Songs{ENTER}") sleep(150) send("cls{ENTER}") sleep(200) send("wget.exe http://www.100fm.co.il/player/mp3/" & $szName & ".mp3" & "{ENTER}") EndSwitch EndSwitch [ it got some Hebrew langauge in it, ignore it, not important ] Link to comment Share on other sites More sharing options...
weaponx Posted October 3, 2007 Share Posted October 3, 2007 Save yourself some trouble and use the builtin InetGet() function instead of Wget. Link to comment Share on other sites More sharing options...
Nahuel Posted October 3, 2007 Share Posted October 3, 2007 Try to use InetGet() Link to comment Share on other sites More sharing options...
Yagel Posted October 3, 2007 Author Share Posted October 3, 2007 (edited) Aight ty , but you know something about my problem? Why its not working at ALL ? it just opening the Run?..=o Edited October 3, 2007 by Yagel Link to comment Share on other sites More sharing options...
Blue_Drache Posted October 3, 2007 Share Posted October 3, 2007 Because you're not using INetGet() Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
Yagel Posted October 3, 2007 Author Share Posted October 3, 2007 (edited) Thank you all =] working! #Region #AutoIt3Wrapper_icon=Icon_1.ico #AutoIt3Wrapper_Res_Comment=100FM.co.il Auto Song Downloader #AutoIt3Wrapper_Res_Description=SXHacker #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_LegalCopyright=SXHacker #AutoIt3Wrapper_Res_Language=1037 #EndRegion $szName = InputBox(Default, "הכנס את השם של השיר", "", " M", Default, Default, Default, Default) Switch @error Case 0 Switch $szName Case "a", "b", "c", "d", "e" $msg = "הכנס שם נורמלי בבקשה." Case "QP" $msg = "הכנס שם נורמלי בבקשה." Case "asdf" to "1234" $msg = "הכנס שם נורמלי בבקשה." Case Else InetGet("http://www.100fm.co.il/player/mp3/" & $szName & ".mp3", "C:\" & $szName & ".mp3") EndSwitch EndSwitch is it ok ? Edited October 3, 2007 by Yagel Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 3, 2007 Share Posted October 3, 2007 (edited) Aight ty , but you know something about my problem? Why its not working at ALL ? it just opening the Run?..=o Glad you got it working. If you are still academically interested in the other way, take out the @echo off command and run it so you can see what it's doing. This works fine for me, for example: Send("#r") WinWaitActive("Run") Sleep(2000) Send("cmd{ENTER}") Sleep(2000) Send("cd c:\Documents And Settings\%username%\Desktop\{ENTER}") Sleep(2000) Send("dir{ENTER}") Sleep(2000) Send("exit{ENTER}") is it ok ? It is if it works, you tell us! Edited October 3, 2007 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
martin Posted October 3, 2007 Share Posted October 3, 2007 (edited) Hey guys, i made a program with this lovley Scrpting Langauge that downloads a song from a site. and i share it at some forum, but people say its opening the Run [ with send("#r") that i did..] and thats it it stoppes. anyone knows why? [ maybe they need some dll filles, net frame work ? or something? ] btw, this is the script: expandcollapse popup#Region #AutoIt3Wrapper_icon=Icon_1.ico #AutoIt3Wrapper_Res_Comment=100FM.co.il Auto Song Downloader #AutoIt3Wrapper_Res_Description=SXHacker #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_LegalCopyright=SXHacker #AutoIt3Wrapper_Res_Language=1037 #EndRegion $szName = InputBox(Default, "הכנס את השם של השיר", "", " M", Default, Default, Default, Default) Switch @error Case 0 Switch $szName Case "a", "b", "c", "d", "e" $msg = "הכנס שם נורמלי בבקשה." Case "QP" $msg = "הכנס שם נורמלי בבקשה." Case "asdf" to "1234" $msg = "הכנס שם נורמלי בבקשה." Case Else Send("#r") WinWaitActive("Run") Send("cmd{ENTER}") sleep(200) Send("@echo off{ENTER}") sleep(150) Send("cls{ENTER}") sleep(150) Send("cd c:\Documents And Settings\%username%\Desktop\{ENTER}") sleep(150) send("cls{ENTER}") sleep(150) send("mkdir 100_FM_Songs{ENTER}") sleep(150) send("cls{ENTER}") sleep(150) send("cd c:\Documents And Settings\%username%\Desktop\100_FM_Songs{ENTER}") sleep(150) send("cls{ENTER}") sleep(200) send("wget.exe http://www.100fm.co.il/player/mp3/" & $szName & ".mp3" & "{ENTER}") EndSwitch EndSwitch To find out why the #r appears not to work I think you need to add some extra code. Instead of winWaitActive("Run"), use something like if WinWaitActive("Run","",5) = 0 then msgbox(0,'Run dialog not detected!','OK') exit endif In case the window doesn't have the title "Run" maybe you aught to detect the window class 32770. EDIT: Oops, PsaltyDS has nudged a reply in. Yes removing the @echo off could help find out what's wrong. Edited October 3, 2007 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Yagel Posted October 3, 2007 Author Share Posted October 3, 2007 Oh , i'm sorry all i figured it out, every body in Israel , [ not every body yes.. ] got an Hebrew computer exept me DOH! :| so its not Run .. its in Hebrew... stupid me :| thank you all for helping .. ! 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