Sign in to follow this  
Followers 0
SirDarknight1200

Can't use Macro

4 posts in this topic

#1 ·  Posted (edited)

Hi All, 

I am a total noob at Autoit. Recently I tried the following code :

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Form1", 615, 438, 192, 124)
$Button1 = GUICtrlCreateButton("Clear Temps", 8, 8, 137, 41)
$Button2 = GUICtrlCreateButton("Clear Prefetch", 8, 72, 137, 41)
$Button3 = GUICtrlCreateButton("Clear Un-necessary system files", 8, 136, 177, 41)
$Button4 = GUICtrlCreateButton("Clear Recycle Bin", 8, 200, 177, 41)
$Button5 = GUICtrlCreateButton("Disable Un-necessary Visualization", 8, 264, 185, 41)
$Button6 = GUICtrlCreateButton("Get System Info", 344, 8, 185, 33)
$Button7 = GUICtrlCreateButton("Check Compatibility", 160, 376, 265, 49)
GUISetState(@SW_SHOW)


While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $Button1
                FileRecycle(@DesktopCommonDir"\*.txt")          
    EndSelect
WEnd

FileRecycle(@DesktopCommonDir"*.txt")

or

FileRecycle("@DesktopCommonDir*.txt")

Neither of them works.

And also how can I make the following work?

MsgBox(0, "Testing", "Test : @SystemDir")

or

MsgBox(0, "Testing", "Test :" @SystemDir)

Edited by SirDarknight1200

Share this post


Link to post
Share on other sites



to combine strings, use the & character. your last example, i marked the & in green:

MsgBox(0, "Testing", "Test :" & @SystemDir)

Share this post


Link to post
Share on other sites

 

FileRecycle(@DesktopCommonDir"*.txt")

or

FileRecycle("@DesktopCommonDir*.txt")

Neither of them works.

 

Use This...

FileRecycle(@DesktopCommonDir & "*.txt")

Share this post


Link to post
Share on other sites

Thans a lot guys  :sorcerer:  :sorcerer:  :sorcerer:

Share this post


Link to post
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
Sign in to follow this  
Followers 0