Jump to content

Search the Community

Showing results for tags 'build with batch file'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. This isn't really an example script nor is it useful at all but it's related to autoit and it's something nice to play with so hope someone who doesn't know much about batch files finds it interesting at the most. Basically, all you gotta do is copy and past this into the header of your script and rename the script from "script.au3" to 'script.bat" or "script.cmd" and run it to compile the script. ;@ECHO OFF ;COLOR 0A & TITLE Terminal AutoIt Compiler Interface ;SET THIS=%0 ;SET REGKEY="HKLMSoftwareAutoIt v3AutoIt" ;SET REGVAL=InstallDir ;SET AUTWRPR=SciTEAutoIt3WrapperAutoIt3Wrapper.exe ;SET INST_DIR= ;ECHO +^>Querying registry value... ;REG QUERY %REGKEY% /v %REGVAL% 2>NUL || (COLOR 0C & ECHO !^>Error getting registry value! & PAUSE & EXIT /b 1) ;FOR /f "tokens=2,*" %%a IN ('REG QUERY %REGKEY% /v %REGVAL% ^| FINDSTR %REGVAL%') DO (SET INST_DIR=%%<img src='http://www.autoitscript.com/forum/public/style_emoticons/<#EMO_DIR#>/cool.png' class='bbc_emoticon' alt='B)' /> ;IF NOT DEFINED INST_DIR (ECHO !^>Error setting value! & PAUSE & EXIT /b 1) ;SET AUTWRPR="%INST_DIR%%AUTWRPR%" ;IF EXIST %AUTWRPR% (ECHO +^>AutoIt3Wrapper Found.) ELSE (COLOR 0C & ECHO !^>AutoIt3Wrapper Not Found. & PAUSE & EXIT /b 1) ;ECHO +^>Initiating compilation procedure! & %AUTWRPR% /prod /in %THIS% ;ECHO +^>Compilation procedure has finished! & PAUSE & EXIT Example ;@ECHO OFF ;COLOR 0A & TITLE Terminal AutoIt Compiler Interface ;SET THIS=%0 ;SET REGKEY="HKLMSoftwareAutoIt v3AutoIt" ;SET REGVAL=InstallDir ;SET AUTWRPR=SciTEAutoIt3WrapperAutoIt3Wrapper.exe ;SET INST_DIR= ;ECHO +^>Querying registry value... ;REG QUERY %REGKEY% /v %REGVAL% 2>NUL || (COLOR 0C & ECHO !^>Error getting registry value! & PAUSE & EXIT /b 1) ;FOR /f "tokens=2,*" %%a IN ('REG QUERY %REGKEY% /v %REGVAL% ^| FINDSTR %REGVAL%') DO (SET INST_DIR=%%<img src='http://www.autoitscript.com/forum/public/style_emoticons/<#EMO_DIR#>/cool.png' class='bbc_emoticon' alt='B)' /> ;IF NOT DEFINED INST_DIR (ECHO !^>Error setting value! & PAUSE & EXIT /b 1) ;SET AUTWRPR="%INST_DIR%%AUTWRPR%" ;IF EXIST %AUTWRPR% (ECHO +^>AutoIt3Wrapper Found.) ELSE (COLOR 0C & ECHO !^>AutoIt3Wrapper Not Found. & PAUSE & EXIT /b 1) ;ECHO +^>Initiating compilation procedure! & %AUTWRPR% /prod /in %THIS% ;ECHO +^>Compilation procedure has finished! & PAUSE & EXIT #AutoIt3Wrapper_Icon=au3.ico #AutoIt3Wrapper_Outfile=test build 1.exe #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_Res_Comment=test app #AutoIt3Wrapper_Res_Description=built with a batch file #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 112, 21, 192, 124) $Label1 = GUICtrlCreateLabel("HELLO WORLD", 0, 0, 83, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Only tested on XP, not sure if works on x64 systems.
×
×
  • Create New...