Jump to content

1 Question :)


Yagel
 Share

Recommended Posts

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:

#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 :o ]

Link to comment
Share on other sites

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 by Yagel
Link to comment
Share on other sites

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 ? :P

It is if it works, you tell us!

;)

Edited 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

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:

#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 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...