Results 1 to 6 of 6

Thread: Batch with specific parameters?

  1. #1
    Join Date
    Jun 2014
    Location
    Vancouver
    Posts
    150
    Mentioned
    1 Post(s)
    Quoted
    89 Post(s)

    Default Batch with specific parameters?

    Would it be possible to write a batch file that does the following?

    1. Opens 5+ Simbas from other batch files or shortcuts
    2. Opens them with specific size
    3. Opens them in a specific location on the screen
    4. Opens them each with scripts loaded

    I know its possible, just don't know if all of those are possible.

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by TylerT View Post
    Would it be possible to write a batch file that does the following?

    1. Opens 5+ Simbas from other batch files or shortcuts
    2. Opens them with specific size
    3. Opens them in a specific location on the screen
    4. Opens them each with scripts loaded

    I know its possible, just don't know if all of those are possible.

    1. Possible. Just call "start /C simba.exe -o scriptlocation/scriptname.simba -r"... -r will run it; -o will open it.
    2. Not possible. You cannot resize windows with batch files without an external program.
    3. Not possible. You cannot move windows with batch files without an external program.
    4. See 1.

    Alternative.. Run Simba with the batch file method 1.. Have Simba move itself and resize its own window. Not sure if you'd need a plugin for that but that's the best you can get. Otherwise write a program to do it.
    Last edited by Brandon; 10-09-2014 at 03:25 AM.
    I am Ggzz..
    Hackintosher

  3. #3
    Join Date
    Jun 2014
    Location
    Vancouver
    Posts
    150
    Mentioned
    1 Post(s)
    Quoted
    89 Post(s)

    Default

    Quote Originally Posted by Brandon View Post
    1. Possible. Just call "start /C simba.exe -o scriptlocation/scriptname.simba -r"... -r will run it; -o will open it.
    2. Not possible. You cannot resize windows with batch files without an external program.
    3. Not possible. You cannot move windows with batch files without an external program.
    4. See 1.

    Alternative.. Run Simba with the batch file method 1.. Have Simba move itself and resize its own window. Not sure if you'd need a plugin for that but that's the best you can get. Otherwise write a program to do it.
    Perfect! Thanks for the response

  4. #4
    Join Date
    Jan 2012
    Posts
    190
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    dont mean to but this is for this thread and its a good add here is something i found that actually might be a possible way to resize a window with batch but even if it is true just only for the console window itself it seems it can work for other applications too
    ----------
    Code:
    @echo off
    setlocal
    set mycmdTitle=My Special Command Prompt
    Set mycmdHeight=40
    Set mycmdWidth=80
    Set mycmdBufferHeight=500
    Set mycmdBufferWidth=%mycmdWidth%
    Set mycmdxPos=0
    Set mycmdyPos=120
    Set mycmdColor=8f
    Set /A mycmdBufferSize=mycmdBufferHeight*0x10000+mycmdBufferWidth
    Set /A mycmdWindowPos=mycmdyPos*0x10000+mycmdxPos
    Set /A mycmdWindowSize=mycmdHeight*0x10000+mycmdWidth
    Set mycmdCmd=Title My First Command Prompt^&Echo.^&Echo.^&Echo.^&Echo.
    Call :StartCommandPrompt %mycmdBufferSize% %mycmdColor% %mycmdWindowPos% %mycmdWindowSize% "%mycmdTitle%" "%mycmdCMD%"
    endlocal
    Goto :EOF
    
    :StartCommandPrompt
    REM receives %1=BufferSize %2=Color %3=WindowPos %4=WindowSize %5=Title %6=cmd
    reg add "HKCU\Console\%~5" /V ScreenBufferSize /T REG_DWORD /D %1 /F >nul
    reg add "HKCU\Console\%~5" /V ScreenColors /T REG_DWORD /D 0x%2 /F >nul
    reg add "HKCU\Console\%~5" /V WindowPosition /T REG_DWORD /D %3 /F >nul
    reg add "HKCU\Console\%~5" /V WindowSize /T REG_DWORD /D %4 /F >nul
    start "%~5" %COMSPEC% /K %6
    goto :eof
    -------------
    and heres where i got it from http://stackoverflow.com/questions/1...-of-cmd-prompt

  5. #5
    Join Date
    Jan 2012
    Posts
    190
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    Ill make this my main Batch thread for now
    I have some deleted HTML pages of the JUDAGO.WEBS I can share them
    ------
    call :sub a b c d e f
    pause
    goto :eof
    :sub
    echo %*
    exit /b
    ------
    ^
    |
    |
    |
    is there a way to use the %* with out it outputing the arguments with trailing spaces?
    heres the output ->
    |
    |
    \/
    a b c d e f
    -----------
    but how to do with %*
    abcdef
    echo %*:~?? for delims in (%*)echo ??
    not sure

  6. #6
    Join Date
    Sep 2010
    Location
    Azeroth
    Posts
    395
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    Code:
    MODE CON:COLS=40 LINES=12
    echo off
    goto :0
    :sub_0
    if not "%s%"=="" if not "%s%"=="]" set /a n=%n%+1
    exit /b
    :sub_1
    if %f% leq 20 (set c=%c%%x%) else (
    set _var%e%=%c%
    set /a e=%e%+1
    set c=%x%
    set f=%n%)
    exit /b
    :sub
    set x=
    set s=
    set n=
    set f=
    set c=
    set e=0
    for %%a in (%*) do (
    set x=%%a
    set n=0
    for /l %%b in (0,1,19) do (
    call set s=%%x:~%%b,1%%
    call :sub_0)
    call set /a n=%%n%%+1
    call set /a f=%%f%%+%%n%%
    call :sub_1)
    set _var%e%=%c%
    for /l %%d in ( 0 1 %e%) do (
    rem call echo %%_var%%d%%)
    call set %%_var%%d%%)
    exit /b
    :mainscreen
    cls
    echo                     %var2%
    for /l %%d in ( 0 1 %e%) do (
    call echo %%_var%%d%%)
    echo ....................
    echo .                  .
    echo %q%
    echo .                  .
    echo ....................
    exit /b
    :input
    call :mainscreen
    set /p input=
    if %input%==chat call :mainscreen&set /p var2=                    &call set var=%%var%%%%var2%%&call set var2=%%var%% 
    if %input%==buyparts set q=.       shop       .& call :sub [nisan] [honda] [toyota] [mazda] [saab] [alfaromeo] [datsun] [detomaso] [back] [chat]
    if %input%==garage set q=.      garage      .& call :sub [buyparts] [listings] [garage] [back] [chat]
    exit/b
    :0
    set q=.      garage      .&call :sub [buyparts] [listings] [garage] [back] [chat]
    for /l %%a in (0) do (
    for /l %%b in (0 1 9) do (
    for %%c in (^| \ -- /) do (
    for /l %%d in (0 1 8888) do (call)
    call :mainscreen
    echo %%c))
    call :input)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •