It is currently March 28th, 2024, 8:03 pm

RainFile

Share and get help with Plugins and Addons
User avatar
KreAch3R
Posts: 608
Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR

Re: RainFile

Post by KreAch3R »

Thanks again Kaelri for fixing the bug. I came back today to continue writing my skin, and I think I noticed the same error in "CurrentValue" variable.
Examples !Bangs (image.jpg doesn't exist):

Code: Select all

LeftMouseUpAction=!Execute ["#ADDONSPATH#RainFile\RainFile.exe" "File" "Variables" "GeoImg1" "#CURRENTPATH#Sent.inc" "C:\Users\KreAch3R\Desktop\image.jpg"]
Opens the dialog in Desktop folder: WORKS

Code: Select all

LeftMouseUpAction=!Execute ["#ADDONSPATH#RainFile\RainFile.exe" "File" "Variables" "GeoImg1" "#CURRENTPATH#Sent.inc" "C:\image.jpg"]
Opens the dialog in C: folder: WORKS

Code: Select all

LeftMouseUpAction=!Execute ["#ADDONSPATH#RainFile\RainFile.exe" "File" "Variables" "GeoImg1" "#CURRENTPATH#Sent.inc" "D:\image.jpg"]
Opens the dialog in C: folder: DOESN'T WORK

Code: Select all

LeftMouseUpAction=!Execute ["#ADDONSPATH#RainFile\RainFile.exe" "File" "Variables" "GeoImg1" "#CURRENTPATH#Sent.inc" "D:\downloads\image.jpg"]
Opens the dialog in C:\Program Files\Rainmeter\Addons\RainFile: DOESN'T WORK

If I leave out the unexisted image.jpg, the folders in C open, but one directory behind (Users/kreach3r/desktop will open users/kreach3r). I suspect this is due to the "DialogType" Variable (rainfile may be treating last directory name as a file?).
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: RainFile

Post by Kaelri »

I can see what's going on. It's not a script error in this case; it's a problem with either AutoIt or Windows itself. I think I can get around it, fortunately, as part of a change that I had already planned to make for the next Enigma update. I'll try not to make you wait too long.
User avatar
AlC
Posts: 329
Joined: June 9th, 2011, 6:46 pm

Re: RainFile

Post by AlC »

If I leave out the unexisted image.jpg, the folders in C open, but one directory behind (Users/kreach3r/desktop will open users/kreach3r). I suspect this is due to the "DialogType" Variable (rainfile may be treating last directory name as a file?).
Why do you take image.jpg, and not just a folder ?

Code: Select all

(Users/kreach3r/desktop will open users/kreach3r)
Had a similar problem. Try ".../Users/kreach3r/desktop/" important is the / at the end, because when you don't add the / at the end it opens the folder before. Normally you should use \ instead of /, isn't it ?
Rainmeter - You are only limited by your imagination and creativity.
User avatar
santa_ryan
Posts: 397
Joined: June 22nd, 2010, 4:11 am

Re: RainFile

Post by santa_ryan »

The backslash at the end of the directory IS required. It's just how autoit operates. Some files don't have file extensions, but you might still need to open it in autoit, therefore it's built in to look for the file, not the directory. Of course, this might not be the case, but I've always understood it to be that way with autoit and windows in general.
I have three rules when I'm trying to help you.
  • Don't get mad when you don't understand something
  • Be VERY specific with what you ask for.
    The more specific you are, the higher the quality of support you receive.
  • Do not just copy and paste what I put in examples and come back saying it doesn't work.
    It does work, but I purposely left blanks that you need to fill for your specific needs.
User avatar
KreAch3R
Posts: 608
Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR

Re: RainFile

Post by KreAch3R »

Kaelri wrote:I can see what's going on. It's not a script error in this case; it's a problem with either AutoIt or Windows itself. I think I can get around it, fortunately, as part of a change that I had already planned to make for the next Enigma update. I'll try not to make you wait too long.
Thanks again Kaelri. I am looking forward to an Updated Enigma (always a source of innovation). This error, however, is a small one, and the addon still works. Besides that, I randomly managed to make it "remember" the last folder (read further down). So, update whenever you have the time :)
AlC wrote: Had a similar problem. Try ".../Users/kreach3r/desktop/" important is the / at the end, because when you don't add the / at the end it opens the folder before. Normally you should use \ instead of /, isn't it ?
santa_ryan wrote:The backslash at the end of the directory IS required. It's just how autoit operates. Some files don't have file extensions, but you might still need to open it in autoit, therefore it's built in to look for the file, not the directory. Of course, this might not be the case, but I've always understood it to be that way with autoit and windows in general.
I was completely unaware of the "\" at the end. Thanks both of you for letting me know about this.
ALC: Yes it was \ instead of /, I have to blame too many website url spellings I guess.:p

I managed to make it remember the last folder I opened by substituting "CurrentValue" with "". This makes it open the last folder, regardless of hard drive directory or folders. Maybe it is/was known that it can be done, but I didn't know it. So I guess everything works as I want it for the time being. :D

Thanks everyone for your time. :)
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image
User avatar
santa_ryan
Posts: 397
Joined: June 22nd, 2010, 4:11 am

Re: RainFile

Post by santa_ryan »

Everytime you use rainfile, it changes the enviromental "Working Directory" variable. So yes, a blank would indicate use the last known working directory.
I have three rules when I'm trying to help you.
  • Don't get mad when you don't understand something
  • Be VERY specific with what you ask for.
    The more specific you are, the higher the quality of support you receive.
  • Do not just copy and paste what I put in examples and come back saying it doesn't work.
    It does work, but I purposely left blanks that you need to fill for your specific needs.
FatherCode
Posts: 21
Joined: October 8th, 2011, 4:01 pm

Re: RainFile

Post by FatherCode »

I tried using it and it works well :thumbup:
But there's something up with it =/
(Not a big issue but still one)

Does it really have to refresh all skins?
Is there a way to make it just update the calling skin alone? =x
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: RainFile

Post by Kaelri »

First post updated with the latest version (0.9.6).

The biggest change is that RainFile no longer needs to be in the Addons folder, which means you can include it in your skins' @Resources folder instead. The new version also lets you specify which parts of the path (drive, directory, name, and/or extension) to return.
User avatar
KreAch3R
Posts: 608
Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR

Re: RainFile

Post by KreAch3R »

Awesome update Kaelri. I 've been waiting for this. I am also very glad that you released your .au3 too, your code is always an example. My current usage of the addon includes writing to an external file (a.k.a not inside \Skins). So, I took the initiative to include a 8th parameter, named "External", which is positioned in front of "Debug" (because Debug is only used in special conditions). Anyway, these are the changed parts:

Command Parameters:

Code: Select all

If $CmdLine[0] > 4 Then
	$DialogType = $CmdLine[1]
	$SectionName = $CmdLine[2]
	$KeyName = $CmdLine[3]
	$TargetFile = $CmdLine[4]
	$Current = $CmdLine[5]
	If $CmdLine[0] > 5 Then
		$Pieces = StringUpper($CmdLine[6])
	Else
		$Pieces = "DPNE"
	EndIf
	If $Cmdline[0] > 6 Then
		$External=1
	Else
		$External=0
	EndIf
	If $CmdLine[0] > 7 Then
		$Debug=1
	Else
		$Debug=0
	EndIf

Code: Select all

;----------------------------------------------
; SEND BANGS

If $External Then
	IniWrite ( $TargetFile, $SectionName, $KeyName, $Chosen )
Else
	_SendBang("!WriteKeyValue " & $SectionName & " " & $KeyName & " " & Chr(34) & $Chosen & chr(34) & " " & chr(34) &$TargetFile & chr(34))
EndIf
Sleep(100)
_SendBang("!Refresh *")

Exit
It's nothing, really, but I wanted this functionality. You can do whatever you want with it. :) When it 'll be time to release my suite, can I include my version as a mod of yours (credited of course)?
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: RainFile

Post by Kaelri »

That's a good idea. I'll definitely try to include that feature in some form the next time I update RainFile.
KreAch3R wrote:When it 'll be time to release my suite, can I include my version as a mod of yours (credited of course)?
Of course. There's a reason everything I touch has a Creative Commons license, you know. ;)