Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
78 user(s) are online (44 user(s) are browsing Forums)

Members: 2
Guests: 76

FlynnTheAvatar, sailor, more...

Headlines

 
  Register To Post  

Invoking a standalone BAT file from the command line (SOLVED)
Quite a regular
Quite a regular


See User information
@cyngusEd , @all

I expected the behaviour to not be any different from clicking my AmiDock icon that points to the standalone bat file. But, when I do something like:
alias jemacs progs:ami/soft/jasspa/mew_standalone.bat


and run:
jemacs


The initial small window pops up asking me if I want to save the options. If I save the options in the current directory, they no longer pop up, but if I switch directories then they pop up.

Do I need to make a wrapper script to invoke the standalone bat file in the context of the directory containing the standalone bat?

Ideally, I would just create an alias and just run the script.

Regards,


Edited by rjd324 on 2022/6/28 17:22:45
If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Invoking a standalone BAT file from the command line
Home away from home
Home away from home


See User information
@rjd324

>Ideally, I would just create an alias and just run the script.

you can't a alias is just a text replcement.
but you should investigate RUN command, and the execute command.
maybe this 3 commands in combination can do what your asking.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Invoking a standalone BAT file from the command line
Quite a regular
Quite a regular


See User information
@rjd324

The problem is, that normally the start script does not change the current directory. This could be an alternative start script, which sets a fixed directory (change the directory to your needs):

.key VERBOSE/K,DISPLAYNUMBER/K,ARGS/M
.def VERBOSE 0
.def DISPLAYNUMBER -1
.bra {
.
ket }

If 
EXISTS "Cygnix:Software/JASSPA-MEmacs-20091011/mew"
  
Set PROGPATH Cygnix:Software/JASSPA-MEmacs-20091011/mew
EndIf

Set DEF_XDRIVER "picasso96wb"
Set DEF_WINWIDTH "1024"
Set DEF_WINHEIGHT "768"
Set DEF_WINDEPTH "16"
Set DEF_WINDOWMANAGER "Dynamic Window Manager"
Set DEF_MAXIMIZE 1

PushCD Cygnix
:Software/JASSPA-MEmacs-20091011

If EXISTS "Cygnix:myX11SetupLight"
  
Cygnix:myX11SetupLight
  
If ${DONOTSTARTEQ "YES"
    
PopCD
    Quit 20
  
EndIf
Else
  
Set Cygnix/CYGNIX_SCREEN_MODE ${DEF_XDRIVER}@${DEF_WINWIDTH}x${DEF_WINHEIGHT}x${DEF_WINDEPTH}
  
Set Cygnix/CYGNIX_DESKTOP_BACKGROUND "none"
  
Set Cygnix/CYGNIX_WINDOW_MANAGER "Cygnix:CygnixPPC/bin/openbox"
EndIf

Set PROGARGS " "

Internal settings
Set LAUNCH_SOUND_SERVER 0
Set LAUNCH_WINDOW_MANAGER 1
Set OPENBOX_RC_FILE 
"openbox-rc.xml"
;Set Cygnix/CYGNIX_QUICK_TRANSFER "1"

GetEnv >NIL: *>NILCygnix/G_FILENAME_ENCODING
If WARN
  Set Cygnix
/G_FILENAME_ENCODING ISO-8859-1
EndIf

Execute Cygnix:S/Execute_Standalone.bat VERBOSE={VERBOSEDISPLAYNUMBER={DISPLAYNUMBER} {ARGS}
PopCD

X-5000 PPC 5020/2 GHZ, Fractal Define XL R2-Tower, OS 4.1 final update 2, 4 GB, Radeon HD 7770, ESI Juli@ XTe
SAM 460ex/1,15 GHZ, OS 4.1 final, 2 GB, Radeon HD 6450
Amiga 4000D/040 25 Mhz, OS 3.9 BB2, 272 MB, X-Surf, 250 MB ZIP
Go to top
Re: Invoking a standalone BAT file from the command line
Not too shy to talk
Not too shy to talk


See User information
what's a .BAT file?

Go to top
Re: Invoking a standalone BAT file from the command line
Quite a regular
Quite a regular


See User information
@NinjaCyborg

An AmigaDOS script or a batch file.

X-5000 PPC 5020/2 GHZ, Fractal Define XL R2-Tower, OS 4.1 final update 2, 4 GB, Radeon HD 7770, ESI Juli@ XTe
SAM 460ex/1,15 GHZ, OS 4.1 final, 2 GB, Radeon HD 6450
Amiga 4000D/040 25 Mhz, OS 3.9 BB2, 272 MB, X-Surf, 250 MB ZIP
Go to top
Re: Invoking a standalone BAT file from the command line
Home away from home
Home away from home


See User information
@NinjaCyborg

It's extension used in MSDOS, for MSDOS scripts, I was going to suggest starting it in DOSBOX, but then i realized it was AmiCynix.

Sometimes people put ".bat" on amiga scripts, you can see it often in Amiga demos scene. I guess it's easier to know its a script, if it has an extension, but its not needed, as you see its script if use LIST command, or if it has a icon.

Maybe we should had used a unique extention for Amiga scripts, how about ".as" for amiga shell or amiga script.


Edited by LiveForIt on 2022/6/28 17:09:56
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Invoking a standalone BAT file from the command line
Just popping in
Just popping in


See User information
@LiveForIt

Nah. We haven't needed an extension before. Why start now?
Plus DOS/Windows will execute a .bat file without you needing to type the extension, but you would have to include the extension to run it from Amiga which is not that helpful really.

Go to top
Re: Invoking a standalone BAT file from the command line
Not too shy to talk
Not too shy to talk


See User information
LOL at everyone's stupid answers

Go to top
Re: Invoking a standalone BAT file from the command line
Home away from home
Home away from home


See User information
@NinjaCyborg

Well, if you ask stupid questions, you get stupid answers, as long as people put up with this crap. Just remember there might be time when people don’t answer you when need help. If your going to continue to offend people like that.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Invoking a standalone BAT file from the command line
Quite a regular
Quite a regular


See User information
Thanks all.
I just created a wrapper script with a fixed dir.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project