wayfinder Posted May 18, 2010 Posted May 18, 2010 (edited) Hi, I am new to using Autoit, and I am having difficulty in creating a working script. what I am trying to do is create a variable that has multiple varibles (forgive my poor understanding) in the string and then from the command line execute. only problem is when i declare variables they don't update after input has been entered, such as $customer. Also could someone please explain the best way to maybe split up $wok variable so i can execute each $d1, $d2, $d3? expandcollapse popup#include <Constants.au3> Global $ping, $pong, $dimsum, $wok, $rice, $fried, $customer, $file $ping = FileGetShortName(@TempDir & '\cooking\file1.exe') $pong = 'title cooking with powchin' & ' ' & '&' & ' ' & 'cls' $dimsum = @TempDir & '\cooking\status.exe' $d1 = $ping & ' ' & 'tomyum' & ' ' & $customer $d2 = $ping & ' ' & 'number78' & ' ' & $customer $d3 = $ping & ' ' & 'specialcombo' & ' ' & $customer $d4 = $ping & ' ' & 'whatchu' & ' ' & $customer $d5 = $ping & ' ' & 'creamofsomeyoung' & ' ' & $customer $d7 = $ping & ' ' & 'harro' & ' ' & $customer $wok = $file & ' ' & $d1 & ' ' & '&' & ' ' & $d2 & ' ' & '&' & $d3 & ' ' & '&&' & ' ' & $d4 & ' ' & '&&' & $d5 & ' ' & '&&' & ' ' & $d7 input1() func input1() $whatsurname = InputBox("Input customer name", "Input customer name", "", "") If @error = 1 Then MsgBox(0, "", "Cancel Pressed, application terminated") Exit Else MsgBox(0, "", $wok) ;used to show output of $fried, but does not seem to update with customer name. input2() EndIf EndFunc Func input2() $Launcher = Run(@ComSpec & ' /k ' & '@echo off' & ' ' & '&' & ' ' & $pong & ' ' & '&' & ' ' & $wok, @SystemDir, @SW_HIDE) Do sleep(20) until ProcessExists($launcher) ==0 Do sleep(20) Until ProcessExists("status.exe") ==0 SplashTextOn("", "Generating report" & @CRLF & "please wait" & @CRLF & "" & @CRLF & _ "", 280, 185, 452, 349, 1, "", 17) sleep(2000) splashoff() Run(@ComSpec & ' /k ' & $dimsum & ' ' & '-u:domsum\' & $customer & ' ' & '&' & ' ' & 'Exit', @SystemDir, @SW_HIDE) Exit EndFunc many thanks Edited May 18, 2010 by wayfinder
omikron48 Posted May 18, 2010 Posted May 18, 2010 Why not use an array? One with [n][3] dimensions...
JohnOne Posted May 18, 2010 Posted May 18, 2010 From what I can make out $wok does not contain any customer name, as $customer holds no value. $whatsurname seems to get the customer name. as for splitting $wok up, as far as I can see its already split up befor you concantenate it. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now