Jump to content

load an image into deamon tools


KyJelly
 Share

Recommended Posts

i'm trying to load an image file into daemon tools for use in a script for chankast (a dreamcast emulator) i'm getting an error on this line:

run("c:\program files\d-tools\daemon.exe" 0 ($Var5)>

$var5 is sent via the command line as a quoted string ie. "c:\emulators\dreamcast\roms\18 wheeler.cdi"

i just dont think i have it right

i've also tried:

run("c:\program files\d-tools\daemon.exe" 0 $Var5>

and that didn't work either

thanks

Edited by KyJelly
Link to comment
Share on other sites

i dont know about daemon.exe... but

in autoit

1

you need a closing ")"

2

sometimes run requires the shortname

so....

$Daemn = FileGetShortName ( "c:\program files\d-tools\daemon.exe" )

Run($Daemn & 0 & $Var5>)

I DO NOT KNOW IF THAT IS THE CORRECT LINE INSIDE RUN

CHECK THE SPACING

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

Are you sure you are using the right command line options? I don't have the newest version, the info for version 3.47 suggests you need a mount switch:

Command Line Switces

-lock

used to lock the DLL operation to be sure no unauthorized program can load daemon.dll and use its functions. Used mainly in autostart (if 'Autolock' option is enabled), but can be used in command line too. Unlocking can be done from Virtual DAEMON manager or other GUI that is currently running. Note that locking has no effect on DAEMON Manager itself or other programs which have been 'authorized' by us to use the DLL.

-noicon

this option is used to prevent DAEMON Tools from creating a taskbar icon. It has no effect if DAEMON manager is already running or you specified another command (except 'lock') in the command line! DAEMON manager automatically exits after command is executed and does not create taskbar icon.

-mount

allows mounting images from command line (or shortcut).

Syntax is: -mount <n>,<path>

where 'n' means DVD-ROM device number ('0' - '3' allowed) and 'path' is the full path to the image file.

Example: daemon.exe -mount 0,"c:\My Images\nameofimage.cue".

Do not forget to set the path in quotes if it contains spaces!

-unmount

allows unmounting images from command line.

Syntax is: -unmount <n>

where 'n' means DVD-ROM device number ('0' - '3' allowed)

-safedisc ?

allows turning Safedisc emulation on/off from command line.

'-safedisc on' enables emulation, '-safedisc off' disables it

-securom ?

allows turning Securom emulation on/off from command line.

'-securom on' enables emulation, '-securom off' disables it

-laserlock ?

allows turning Laserlock emulation on/off from command line.

'-laserlok on' enables emulation, '-laserlok off' disables it.

-rmps ?

allows turning RMPS emulation on/off from command line.

'-rmps on' enables emulation, '-rmps off' disables it.

Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

ok well i forgot the -mount switch but i still cant get it to work even after trying that

the exact command is:

c:\program files\d-tools\daemon.exe -mount 0 "c:\emulators\dreamcast\roms\18 wheeler.cdi"

the image path is $var5 however

Link to comment
Share on other sites

  • Developers

ok well i forgot the -mount switch but i still cant get it to work even after trying that

the exact command is:

c:\program files\d-tools\daemon.exe -mount 0 "c:\emulators\dreamcast\roms\18 wheeler.cdi"

the image path is $var5 however

run('c:\program files\d-tools\daemon.exe -mount 0 "' & $var5 &'"')

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

  • Developers

$var5 will already have quotes around it. how does that change it?

come on... that should be a piece of cake ... :o

run('c:\program files\d-tools\daemon.exe -mount 0 ' & $var5 )

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

i can't get it to run in the "run" line in windows start menu either. i had always done this b4 through the cmd prompt in a batch file.

the syntx for that is:

echo Starting Daemon Tools

cd C:\Program Files\d-tools

start daemon.exe -mount 0, %1

oops i see i missed the comma after the 0

i tried adding the zero and it still dont work

Link to comment
Share on other sites

  • Developers

i got it to work from "run" by using this exact line:

"c:\program files\d-tools\daemon.exe" -mount 0, "c:\emulators\dreamcast\roms\18 wheeler.cdi"

your previous command line didn't have the comma behind the 0 and no double qoutes before and after the program....

run('"c:\program files\d-tools\daemon.exe" -mount 0,' & $var5 )
Edited by JdeB

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

  • Developers

also "-mount 0," is NOT inside the quotes when i use it in the "run" line.

see:

"c:\program files\d-tools\daemon.exe" -mount 0, "c:\emulators\dreamcast\roms\18 wheeler.cdi"

No idea what you mean... don't think any of the provided code had a double qoute around -mount 0....

Unless you are missing the basics here: The run command has to be a STRING. so your whole command is wrapped in single of double quotes.....

just try the last version and see what is says this time... :o

Edited by JdeB

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

it says "error in command line" from daemon tools

is there a way to tell what $var5 is after the script loads?

here is my whole script:

if $cmdline[0] = 5 Then

$Var1 = $cmdline[1]

$Var2 = $cmdline[2]

$Var3 = $cmdline[3]

$Var4 = $cmdline[4]

$Var5 = $cmdline[5]

EndIf

;mount image in daemon tools

run('"c:\program files\d-tools\daemon.exe" -mount 0,' & $var5 )

sleep (1000)

;start chankast

run($Var4)

WinWaitActive("Chankast Alpha v0.25")

;set resolution to 800x600

if $Var1 = 800 Then

send("!o")

send("{down}")

send("{down}")

send("{right}")

send("{right}")

send("{down}")

send("{enter}")

endif

;set resolution to 1024x768

if $Var1 = 1024 then

send("!o")

send("{down}")

send("{down}")

send("{right}")

send("{right}")

send("{down}")

send("{down}")

send("{enter}")

endif

;set resolution to 1280x1024

if $Var1 = 1280 then

send("!o")

send("{down}")

send("{down}")

send("{right}")

send("{right}")

send("{down}")

send("{down}")

send("{down}")

send("{enter}")

endif

;set priority to high

if $Var2 = "prihigh" then

send("!o")

send("{down}")

send("{down}")

send("{down}")

send("{down}")

send("{right}")

send("{down}")

send("{enter}")

endif

;set capcom hack on

if $Var3 = "capyes" then

send("!o")

send("{down}")

send("{down}")

send("{down}")

send("{down}")

send("{down}")

send("{enter}")

endif

;get rid of stats

send("!o")

send("{down}")

send("{down}")

send("{right}")

send("{down}")

send("{down}")

send("{down}")

send("{down}")

send("{enter}")

;run the game

send("!r")

send("{enter}")

;set fullscreen

send("!{enter}")

exit

Link to comment
Share on other sites

  • Developers

to debug just change the run to:

msgbox(0,"debug",'"c:\program files\d-tools\daemon.exe" -mount 0,' & $var5 )

and tell me what is shows....

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

after this command:

c:\emulators\dreamcast\dreamscript.exe 1280 prihigh capno "c:\emulators\dreamcast\chankast.exe" "c:\emulators\dreamcast\roms\18 wheeler.cdi"

i get:

"c:\program files\d-tools\daemon.exe" -mount 0,c:\emulators\dreamcast\roms\18 wheeler.cdi

in the msgbox

it's not getting the quotes to it

Edited by KyJelly
Link to comment
Share on other sites

  • Developers

after this command:

c:\emulators\dreamcast\dreamscript.exe 1280 prihigh capno "c:\emulators\dreamcast\chankast.exe" "c:\emulators\dreamcast\roms\18 wheeler.cdi"

i get:

":\program file\d-tool\daemon.exe" -mount 0,c:\emulators\dreamcast\roms\18 wheeler.cdi

in the msgbox

it's not getting the quotes to it

No, that is what i expected... remember my first line i posted ?

What about the C at the start of the line ?

So try this one:

msgbox(0,"debug",'"c:\program files\d-tools\daemon.exe" -mount 0,"' & $var5 &'"')

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

that worked like a charm. i'm sorry i didn't listen in the first place :o

one more thing. i've added hotkeys to togle a few settings and to exit the emulator and script.

will u take a look at these and see if they are right:

hotkeyset("{esc}", "exit")

hotkeyset("c", "capcom")

hotkeyset("s", "stats")

Func exit()

WinClose("Chankast Alpha v0.25")

exit

Endfunc

func capcom()

send("!o")

send("{down}")

send("{down}")

send("{down}")

send("{down}")

send("{down}")

send("{enter}")

endfunc

func stats>

send("!o")

send("{down}")

send("{down}")

send("{right}")

send("{down}")

send("{down}")

send("{down}")

send("{down}")

send("{enter}")

endfunc

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