|
|
|
|
#1 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Script not working...
code: This is a script that brainsucker made for me, but it isn't working quite right. The "*.zip" bit that is meant to show only zip files is not working - *.* show instead. Can anyone fix this for me? Thanks -Stu |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Mar 2003
Posts: 571
|
Have you considered using InstallOptions2 with a FileRequest control using a filter to restrict the FileOpen window to only showing Zip files ("Filter=ZIP Files|*.zip") ?
|
|
|
|
|
|
#3 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
The whole perpose of this script is to open the dialog in a Section.
-Stu |
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Mar 2003
Posts: 571
|
Sorry my answer was of no use to you: your original message did not mention how the script fragment was being used.
|
|
|
|
|
|
#5 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Try replacing:
System::Call '*(&t19 "Zip files", &t6 "*.zip", &t16 "Zip files", &t4 "*.zip", &i1 0) i.r0' with: System::Call '*(&t10 "Zip files", &t6 "*.zip", &t10 "Zip files", &t6 "*.zip", &i1 0) i.r0' Notice that I have changed the number after every &t to match the number of the characters in the string + 1. If that doesn't work try removing the second pair of "Zip files", "*.zip". Maybe Windows doesn't like it when you specify the same thing twice. NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
I put it in twice because the first pair didn't do anything (original script).
I will check this new one out, thanks. -Stu |
|
|
|
|
|
#7 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
I have made a function out of this, which can be found here:
http://nsis.sourceforge.net/archive/...ances=0,11,211 I have allowed users to Push different Flags for use, but I'm not sure what the different flags need to be seperated with. Anyone know? Thanks -Stu |
|
|
|
|
|
#8 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Now, here is the DirRequest function by brainsucker:
code: The line... System::Call 'shell32::SHBrowseForFolderA(i r1) i.s' ...crashes the installer everytime. -Stu |
|
|
|
|
|
#9 |
|
Senior Member
|
Afrow UK: have you solved you problem with dirrequest?
updated versions included. BrowseForFolderNew - no startup folder. Source - attached. You'll probably need updated exehead to use them. Use: push "Select folder Demo" push "d:\Program files" ; startup folder call BrowseForFolder pop $0 MessageBox MB_OK "Selected folder '$0'" push "Select folder Demo small" call BrowseForFolderNew pop $0 MessageBox MB_OK "Selected folder '$0'" |
|
|
|
|
|
#10 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
The new script also crashes; after clicking OK after selecting the folder.
This happens on my Windows XP system, not sure about Windows 98 (not able to test). -Stu |
|
|
|
|
|
#11 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Ok, I'll need latest CVS first...
Thanks -Stu |
|
|
|
|
|
#12 |
|
Senior Member
|
Sorry Afrow. I don't think the latest CVS will help. No one of NSIS developers updated NSIS exehead code yet (as I know). If it will became critical for you I can send you updated makensis compiled from latest CVS and my changes.
|
|
|
|
|
|
#13 |
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
One heck of an old thread - perhaps FileRequest doesn't work under XP? Not sure.
Basically I was hoping to make use of this function to pop up a file browsing dialog that would show hidden files/folders. (DialogsEx doesn't support it - d'oh) But even the sample code in the WiKi seems to do zilch and returns a null value. I get the following values for the usual variables just before the function starts popping the originals: code: Any clues or "oops - silly us, change 'this' to 'that'" would be appreciated. |
|
|
|
|
|
#14 |
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
nevermind - the first thing I tried was getting rid of the $R4 in the call to comdlg32 and, out of habit more than anything, spelled it "GetOpenFileName". Immediately, things worked.
Then I thought "well why wouldn't that $R4 insert?" before I realized that it did. Except it inserted "open" and thus the call was "GetopenFileName". Oops? :P I'll adjust the wiki in a moment. |
|
|
|
|
|
#15 |
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
Only to hit the next problem - it's not showing me the hidden files/folders.
![]() I tried passing... code: and code: Neither worked. Am I missing something else? Edit: I also tried the flag "0x00000200" for multi-select, and it fails to work if passed as: code: but works when using: code: So double-checked with the hidden files one - but still no luck. |
|
|
|
|
|
#16 |
|
Senior Member
Join Date: Mar 2006
Location: Dallas
Posts: 462
|
I believe that the flags should be OR'ed together, not listed with commas between them: 0x10A01800. (And for multiselect, 0xA01A00). My commdlg.h file (From Visual C++, 6.0) doesn't show a flag for hidden files, are you sure the 0x10000000 is correct?
When I open a dialog for files with my editor (Crimson Editor) or with Firefox, it automatically includes hidden files. I can see 'thumbs.db' which has 'HSA' attributes. Did you try changing the dialog view type to 'detail' and adding the attribute column to the view? (right click on the detail view column header and select the columns you want). Don |
|
|
|
|
|
#17 | ||||
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
Quote:
Quote:
Quote:
FireFox 1.5 isn't showing me the hidden file either. Perhaps its location is important.. c:\documents and settings\myUsername\My Documents\somefile.jpg somefile.jpg as the attributes: archive, hidden Quote:
|
||||
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|