Jump to content

How to convert batch file to .au3


Recommended Posts

Please help me.... 

My batch command>>>>>

@echo off
setlocal enabledelayedexpansion
COLOR 0A
mode con:cols=81 lines=20
cls
echo harryKumar >> log.txt
echo ^|%date% -- %time%^| >> log.txt
mkdir upx
cls
echo __________________________________________________________________________________________________________________________________________________________________
echo                                upx
echo                                ---
echo  Option
echo  ------
echo  01 UPX (input exe,dll 'UPX' folder output 'UPX' folder)
echo  02 Quit
echo __________________________________________________________________________________________________________________________________________________________________
SET /P menunr=Please make your decision:
IF %menunr%==01 (goto UPXP)
IF %menunr%==02 (goto quit)
:WHAT
echo You went crazy and entered something that wasnt part of the menu options
PAUSE
Start.bat
SET /P menunr=
Start.bat
:UPXP
cls
other\upx.exe -9 -f -k UPX\*.exe >> log.txt
cls
other\upx.exe -9 -f -k UPX\*.dll >> log.txt
cls
Start.bat

66726565776172656F6E74686973373737

Link to comment
Share on other sites

  • Moderators

harryKumar,

Welcome to the AutoIt forums. :)

What have you tried so far? :huh:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Converting 1-on-1 batch to autoit (directly porting it, so to speak) isn't the correct way to approach this challenge. You'll end up with a bad port, like a game ported from the console to the PC where the instructions still only mention the console buttons.

A better way to go about it would be to start from scratch by writing down a bullet list of what you want your application to do and which interactions with user or system it needs to do, and then try to solve the separate bullets piece by piece by writing autoit code for it. Feel free to ask for more specific help on any subtask, or help with designing your script. That's what people here enjoy helping with much more than just "I have this and I need that" :)

Do it like this, and a- you don't end up with a badly written and chaotic port, and b- you'll learn and enjoy more in the process. What's more, you're much more likely to get useful help on this forum if you go through a "software design phase" publicly :) Good luck!

Ideas for subtasks that are easy to approach as separate challenges and then combine into the main project:
 

  • write to a logfile
  • execute a system command and capture output
  • execute code in subroutines as a function
  • present a simple choice menu to the user
  • ... etc...
Edited by SadBunny

Roses are FF0000, violets are 0000FF... All my base are belong to you.

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