Jump to content

What Is The Set Command In Autoit?


Recommended Posts

I need to create an exe. I am working off of cmd file.

I can do everything but handle this section of the file.

SET FWR=%DISK%\%BATCH2%\FWR

SET SYSINF=%JOBDIR%\SYSINF.DAT

SET PRINT1=%FWR%\FEDWIRE.TXT

Can anyone point me to the right section in the help file?

Link to comment
Share on other sites

AutoIt does not need Set to assign variables. We just assign like:

$FWR = $DISK & "\" & $BATCH2 & "\" & $FWR

Well, the above does not translate your code, but I see just a part of DOS code, but I believe the above is a hint of how AutoIt works in comparison to the DOS equivalent line.

Link to comment
Share on other sites

AutoIt does not need Set to assign variables. We just assign like:

$FWR = $DISK & "\" & $BATCH2 & "\" & $FWR

Well, the above does not translate your code, but I see just a part of DOS code, but I believe the above is a hint of how AutoIt works in comparison to the DOS equivalent line.

I think below is what I need.

I found this in the helpfile.

EnvSet

--------------------------------------------------------------------------------

Writes an environment variable.

EnvSet ( "envvariable" [, "value"] )

Edited by MaCgyver
Link to comment
Share on other sites

This is what I am building the autoit exe off of.

CLS

@ECHO OFF

@ECHO ============================== JOB BUNRFWJ ==============================

@ECHO.

@ECHO FEDWIRE REPORT

@ECHO.

@ECHO ============================================================

@ECHO.

SET FWR=%DISK%\%BATCH2%\FWR

SET SYSINF=%JOBDIR%\SYSINF.DAT

SET PRINT1=%FWR%\FEDWIRE.TXT

@ECHO.

@ECHO ============================== STEP 02 BUNRFW

@ECHO.

REM RUNBW BUNACC

CALL D:\BNKTRADE\BATCH\SQLSYS\BUNRFW.EXE >> D:\BNKTRADE\SPOOL\BUNRFW.LOG

@ECHO ============================== STEP PRINT

CALL LCPRINT.CMD %PRINT1%

@ECHO.

@ECHO ============================== STEP DELETE

@ECHO.

:ENDJOB

COPY %FWR%\OUTFILE.DAT %FWR%\OUTFILE.BKP

IF EXIST %FWR%\OUTFILE.DAT DEL %FWR%\OUTFILE.DAT

IF EXIST %JOBDIR%\SYSINF.DAT DEL %JOBDIR%\SYSINF.DAT

@ECHO.

@ECHO ============================== END JOB BUNRFWJ

Link to comment
Share on other sites

I think below is what I need.

I found this in the helpfile.

EnvSet

--------------------------------------------------------------------------------

Writes an environment variable.

EnvSet ( "envvariable" [, "value"] )

Rarely need to use it. Perhaps you do not need to use either.

You Set a variable in DOS as

Set Var=Variable
Echo %Var%

In AutoIt, you can do this

$Var = "Variable"
MsgBox(0, "This is a variable", $Var)

If Exist would be the equivalent of FileExists() in AutoIt.

Use the RunWait() function for BUNRFW.exe file. You can use @Comspec if you want, to pipe to file.

FileDelete() to remove files that you list.

Well, AutoIt does not not a CLS command as it is a Gui process, not DOS based (Cui).

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