Hi Team,
I am new in this scripting please help asap .....
I am creating the script that take the inputs from the user as path of file name and run the command on that file path .
i have created the below script .. When i click button it should run the command on selected user path .
If you see the function Nfixup() that does not work ..
Please guide me how to run the command on Path which taken input from users ...
#include <GUIConstants.au3>
Dim $msg
Dim $Button1
Dim $Button2
Dim $Button3
Dim $path
Dim $test
main()
Func main()
GUICreate(" Archive Maintanance", 430, 300)
GUICtrlCreateLabel("Select The Nsf File**", 100, 20)
$path = GUICtrlCreateInput("",10,53,200,23)
$browse = GUICtrlCreateButton("Browse File", 235, 53,100, 30)
$Button1 = GUICtrlCreateButton("NFixup", 135, 125, 100, 30)
$Button2= GUICtrlCreateButton("Nupdall", 135, 170, 100, 30)
$Button3= GUICtrlCreateButton("Ncompact", 135, 215, 100,30)
GUISetState()
$msg = 0
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()
Select
Case $msg = $browse
$File2open = FileOpenDialog ("Browse", "C:\", "Text Documents (*.nsf)") ;returns the file path
GUICtrlSetData($path, $File2open) ;set input data
$test = GUICtrlSetData($path, $File2open)
MsgBox(0 ,"Path",$test )
Case $msg = $Button1
MsgBox(4096,"","You have pressed Nfixup command " )
nfixup()
Case $msg = $Button2
MsgBox(4096,"","You have pressed Nupdall command " )
Case $msg = $Button3
MsgBox(4096,"","You have pressed Ncompactcommand " )
;GUICtrlCreateLabel("Lotus Notes Installation location should be in below path", 30, 10)
;GUICtrlCreateLabel("C:\Program Files\IBM\Lotus\Notes\", 30, 30)
Case Else
;;;;;;;
EndSelect
WEnd
EndFunc
Func nfixup()
$display = GUICtrlRead(4,1)
$Cmd= "/k cd %programfiles% & cd Lotus & cd notes & Nfixup -F "
MsgBox(0,"NFixup",$display)
Run(@ComSpec & $cmd ,$ display "",@SW_Show)
EndFunc
I am new in this scripting please help asap .....
I am creating the script that take the inputs from the user as path of file name and run the command on that file path .
i have created the below script .. When i click button it should run the command on selected user path .
If you see the function Nfixup() that does not work ..
Please guide me how to run the command on Path which taken input from users ...
#include <GUIConstants.au3>
Dim $msg
Dim $Button1
Dim $Button2
Dim $Button3
Dim $path
Dim $test
main()
Func main()
GUICreate(" Archive Maintanance", 430, 300)
GUICtrlCreateLabel("Select The Nsf File**", 100, 20)
$path = GUICtrlCreateInput("",10,53,200,23)
$browse = GUICtrlCreateButton("Browse File", 235, 53,100, 30)
$Button1 = GUICtrlCreateButton("NFixup", 135, 125, 100, 30)
$Button2= GUICtrlCreateButton("Nupdall", 135, 170, 100, 30)
$Button3= GUICtrlCreateButton("Ncompact", 135, 215, 100,30)
GUISetState()
$msg = 0
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()
Select
Case $msg = $browse
$File2open = FileOpenDialog ("Browse", "C:\", "Text Documents (*.nsf)") ;returns the file path
GUICtrlSetData($path, $File2open) ;set input data
$test = GUICtrlSetData($path, $File2open)
MsgBox(0 ,"Path",$test )
Case $msg = $Button1
MsgBox(4096,"","You have pressed Nfixup command " )
nfixup()
Case $msg = $Button2
MsgBox(4096,"","You have pressed Nupdall command " )
Case $msg = $Button3
MsgBox(4096,"","You have pressed Ncompactcommand " )
;GUICtrlCreateLabel("Lotus Notes Installation location should be in below path", 30, 10)
;GUICtrlCreateLabel("C:\Program Files\IBM\Lotus\Notes\", 30, 30)
Case Else
;;;;;;;
EndSelect
WEnd
EndFunc
Func nfixup()
$display = GUICtrlRead(4,1)
$Cmd= "/k cd %programfiles% & cd Lotus & cd notes & Nfixup -F "
MsgBox(0,"NFixup",$display)
Run(@ComSpec & $cmd ,$ display "",@SW_Show)
EndFunc