Jump to content

Recommended Posts

Posted (edited)

Hey. Can someone assist me in getting this code to work. Basically what I'm trying to do is stop my notification bar from displaying, unless the .gif or .png (or both) have copied to the directory. At the moment it seems like the notificaiton bar is displayed even if the files are not copied to the directory. Anyone got any ideas?...thanks

I have commented out the additional code, as i'm not sure its correct.

#include <MyExtras\NotificationBar.au3>;this is a notification bar that is compiled during into setup once built

;if fileexists ("C:\OUTPUT\MASTER\*.gif") and ("C:\OUTPUT\MASTER\*.png")  Then
    
filemove("C:\OUTPUT\MASTER\*.gif","C:\OUTPUT\29944M_10386\",9)
filemove("C:\OUTPUT\MASTER\*.png","C:\OUTPUT\29944M_10386\",9)
DirRemove("C:\OUTPUT\MASTER");deletes the original folder
    _UserNotification_Display("files extracted", "Extracted on "& @MDAY & "-" & @MON & "-" & @YEAR & " @ " & @HOUR & ":" & @MIN);notification information if extraction passes

;endif
Edited by jben
Posted

Thanks..

The only problem I have now is that its not essential for both files to be available. As long as either the .png or .gif file is available then the code should proceed to my notifcation popup.

If both files are available then thats also fine, but if only the .png file is available then the notification will still be displayed..

I tried:

if fileexists ("C:\OUTPUT\MASTER\*.gif") or fileexists ("C:\OUTPUT\MASTER\*.png")   Then

doesn't seem to work

Posted

Thanks..

The only problem I have now is that its not essential for both files to be available. As long as either the .png or .gif file is available then the code should proceed to my notifcation popup.

If both files are available then thats also fine, but if only the .png file is available then the notification will still be displayed..

I tried:

if fileexists ("C:\OUTPUT\MASTER\*.gif") or fileexists ("C:\OUTPUT\MASTER\*.png")   Then

doesn't seem to work

I don't follow your logic first you say that if either of them is present it's okay to proceed, but then you say it's not okay if the png exists?

Broken link? PM me and I'll send you the file!

Posted

The problem must lie in the fact that you're using wildcards.

Do some debugging with filenames you know.

Broken link? PM me and I'll send you the file!

Posted (edited)

I think I can see why its not working

filemove("C:\OUTPUT\MASTER\*.gif","C:\OUTPUT\29944M_10386\",9);moves the .ncp file to the folder (creates folder if doesn't exist)

filemove("C:\OUTPUT\MASTER\*.ping","C:\OUTPUT\29944M_10386\",9);moves the .lcn file to the folder (creates folder if doesn't exist)

if the .gif file is not available then it seems like its getting stuck

If I take out the checking and put the files in the folder then it copys them fine...Its just the issue that I don't want the notification to display unless either (or both) files have copied

Edited by jben
Posted (edited)

I'm thinking maybe something like this:

Any ideas of how I could implement this??....thanks

if FileExists("C:\OUTPUT\MASTER\*.gif") then
filemove("C:\OUTPUT\MASTER\*.ncp","C:\OUTPUT\29944M_10386\",9)
endif
if FileExists ("C:\OUTPUT\MASTER\*.png") then
filemove("C:\OUTPUT\MASTER\*.lcn","C:\OUTPUT\29944M_10386\",9)
endif
DirRemove("C:\OUTPUT\MASTER");deletes the original folder
Edited by jben
Posted (edited)

Is this what you want?

$bool=False
if FileExists("C:\OUTPUT\MASTER\*.gif") then
 filemove("C:\OUTPUT\MASTER\*.ncp","C:\OUTPUT\29944M_10386\",9)
$bool=True
 endif
 if FileExists ("C:\OUTPUT\MASTER\*.png") then
 filemove("C:\OUTPUT\MASTER\*.lcn","C:\OUTPUT\29944M_10386\",9)
$bool=True
 endif
If $bool Then
 DirRemove("C:\OUTPUT\MASTER");deletes the original folder
EndIf

I still doesn't have full understanding of what it is you want to do though...

Edited by monoceres

Broken link? PM me and I'll send you the file!

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
×
×
  • Create New...