help with autoit scripting

01/13/2008 17:28 emmanication#1
FileMove("I want to input my own folder location using a input box but how?")

basically i want an input box of a location then it would string to the filemove location pls help me

sry bad english im sleepy
01/13/2008 19:22 swords#2
Well I've never been all hyped up about file functions, or input boxes -.-

What is the use for? Maybe I can think of a different way to fix the problem using a different code?
01/13/2008 22:24 Hiyoal#3
Please explain in more detail. What do you mean by stringing the input box's input to the filemove location??

I can definatelly help you out with this one though.

Hiyoal
01/14/2008 03:42 emmanication#4
lets say i want to rename a file in a folder and i want an input box to represent the location of the folder.

input box = location of the folder
01/14/2008 03:56 Hiyoal#5
Ok...So you basically you could type in c:\newfolderforme and it would create a new folder?? Or... The input box displays the path??

Give me some code to explain your concept. Im still not quite sure what you are getting at. :confused:

Hiyoal
01/14/2008 07:58 emmanication#6
$file = GUICtrlCreateInput ( "Input location of conquer here", 10, 5, 300, 20)
FileMove("$file\3DEffect.ini", "$file\3DEffect.ini", 1)

$file = suppose to be the location of the conquer folder XD
01/14/2008 08:52 Hiyoal#7
O ok. I get what your saying now but your coding is wrong.

Try This

$file = GUICtrlCreateInput("Input location of conquer here",10,5,300,20)

$file=GUICtrlRead() ;this gets the actual input of what was typed, doesnt return in a number

FileMove($file & "ini3DEffect.ini",$file & "3DEffect.ini") ;Copies 3DEffect.ini from Conquer2.0ini folder into Conquer2.0 folder

Hope that helps you...

Hiyoal
01/14/2008 10:46 emmanication#8
#include <GuiConstants.au3>

GuiCreate("MyGUI", 392, 72,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$file1 = GuiCtrlCreateInput("Conquer Online Folder", 10, 10, 370, 20)
$Button_1 = GuiCtrlCreateButton("Remove 3DEffects", 10, 40, 100, 20)
$file2 = GUICtrlRead($file1)

GuiSetState()
While 1
$msg = GuiGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button_1
FileMove($file2 & "3DEffect.ini",$file2 & "_3DEffect.ini", 9)
MsgBox(0,"","Effects Removed")
Case Else
;;;
EndSelect
WEnd
Exit


dont seem to work for me
01/14/2008 11:16 Hiyoal#9
Heres your problem:

#include <GuiConstants.au3>

GuiCreate("MyGUI", 392, 72,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$file1 = GuiCtrlCreateInput("Conquer Online Folder", 10, 10, 370, 20)
$Button_1 = GuiCtrlCreateButton("Remove 3DEffects", 10, 40, 100, 20)
$file2 = GUICtrlRead($file1) ;THIS SHOULD BE IN CASE $msg = $Button_1 SO THAT IT CHECKS AFTER YOU HAVE INPUTED SOMETHING

GuiSetState()
While 1
$msg = GuiGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button_1
FileMove($file2 & "3DEffect.ini",$file2 & "_3DEffect.ini", 9)
MsgBox(0,"","Effects Removed")
Case Else
;;;
EndSelect
WEnd
Exit ;YOU DONT NEED THIS

Make it look like this:

#include <GuiConstants.au3>

GuiCreate("MyGUI", 392, 72,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$file1 = GuiCtrlCreateInput("Conquer Online Folder", 10, 10, 370, 20)
$Button_1 = GuiCtrlCreateButton("Remove 3DEffects", 10, 40, 100, 20)


GuiSetState()
While 1
$msg = GuiGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button_1
$file2 = GUICtrlRead($file1)
Filemove($file2 & "3DEffect.ini",$file2 & "_3DEffect.ini", 9)
MsgBox(0,"","Effects Removed")
Case Else
;;;
EndSelect
WEnd