AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[module] Dlg 5.02
Goto page Previous  1, 2, 3 ... , 9, 10, 11  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
tidbit



Joined: 10 Mar 2008
Posts: 676
Location: USA

PostPosted: Sun Jul 12, 2009 11:30 pm    Post subject: Reply with quote

tidbit wrote:
I've been using the CmnDlg_Color function and i love it, however it is not returning any false/errorlevel when i press Cancel or the X.

i am using The latest Autohotkey version

my script is here: http://www.autohotkey.com/forum/viewtopic.php?p=259474 and i included the function in my code. could that be the cause?

Hasn't been fixed in 5.0 either
_________________
rawr. be very affraid
*poke*
Note: My name is all lowercase for a reason.
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 4116
Location: Belgrade

PostPosted: Mon Jul 13, 2009 9:59 am    Post subject: Reply with quote

ur code is bad, it wont fix itself.
_________________
Back to top
View user's profile Send private message
Mystiq



Joined: 08 Jan 2007
Posts: 42

PostPosted: Mon Jul 27, 2009 3:50 am    Post subject: Reply with quote

Awesome as usual!

The current version seems to have typo in the following line.

Code:

Dlg_Open( hGui=0, Title="", Filter="", DefultFilter="", Root="", DefaultExt="", Flags="FILEMUSTEXIST HIDEREADONLY" ) {


This should probably be "DefaultFilter" and not "DefultFilter"?
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 4116
Location: Belgrade

PostPosted: Mon Jul 27, 2009 11:10 am    Post subject: Reply with quote

Thanks for tests and continuous feedback.

BTW, I have seen your message in Rebar thread and I will see whats wrong as soon as I find time for that.
_________________
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 4116
Location: Belgrade

PostPosted: Mon Jul 27, 2009 6:30 pm    Post subject: Reply with quote

Fixed.
Typo was a bug - you couldn't set default filter.
I also added remark and changed the code about Replace dialog and d flag as requested by Jballi.

Version isn't changed.
_________________
Back to top
View user's profile Send private message
jballi



Joined: 01 Oct 2005
Posts: 537
Location: Texas, USA

PostPosted: Sat Aug 29, 2009 11:31 pm    Post subject: Reply with quote

Found a problem with the Dlg_Find function. I would call it a bug but I looked at the code and it looks like it should work. Might be a "easy to duplicate" (I found it) but a "not so easy to fix" AutoHotkey bug. There is an easy work-around.

The problem: If you call the Dlg_Find function with only the "w" ("Match whole word only") flag, the Find dialog pops up but the "Match whole word only" option is not selected. All other combinations of flags appears to work.

Here's the code that's causing the problem:
Code:
f := 0
    ,InStr(flags, "d")  ? f |= FR_DOWN          :
    ,InStr(flags, "c")  ? f |= FR_MATCHCASE     :
    ,InStr(flags, "w")  ? f |= FR_WHOLEWORD     :
    ,InStr(flags, "-d") ? f |= FR_HIDEUPDOWN    :
    ,InStr(flags, "-w") ? f |= FR_HIDEWHOLEWORD :
    ,InStr(flags, "-c") ? f |= FR_HIDEMATCHCASE :

Like I said, it should work (f=2) but it don't (f=0).

The work-around: If you get rid of the leading "," (comma) character from the 2nd through the last line, it works like a champ. The Dlg_Replace function doesn't have this problem because it is written differently.

Let me know if you are unable to duplicate the problem or if you need any additional information.
Back to top
View user's profile Send private message Send e-mail
majkinetor



Joined: 24 May 2006
Posts: 4116
Location: Belgrade

PostPosted: Sun Aug 30, 2009 11:48 am    Post subject: Reply with quote

Fixed (v5.01) . I added "" after the :

Thank you jballi Smile
_________________
Back to top
View user's profile Send private message
Guest






PostPosted: Fri Sep 11, 2009 9:46 pm    Post subject: Reply with quote

jballi wrote:
The ChooseFont is much impoved. Thanks. I'm only making a fuss about this function because I'm hoping to use it in the future. Smile

One additional idiosyncrasy. The color value returned is sometimes correct but usually it's not.

Thanks.
Back to top
majkinetor



Joined: 24 May 2006
Posts: 4116
Location: Belgrade

PostPosted: Fri Oct 30, 2009 7:59 pm    Post subject: Reply with quote

*** version 5.02 ***
! Fixed S bug in Font dialog.
* Licence changed from GPL to BSD.
_________________
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 4116
Location: Belgrade

PostPosted: Sat Oct 31, 2009 2:31 pm    Post subject: Reply with quote

Jballi wrote:
One additional idiosyncrasy. The color value returned is sometimes correct but usually it's not.

Hm? I can't reproduce this. 2nd sample at the end of the documentation works for me for each color.
_________________
Back to top
View user's profile Send private message
jballi



Joined: 01 Oct 2005
Posts: 537
Location: Texas, USA

PostPosted: Sat Oct 31, 2009 5:16 pm    Post subject: Reply with quote

majkinetor wrote:
Jballi wrote:
One additional idiosyncrasy. The color value returned is sometimes correct but usually it's not.

Hm? I can't reproduce this. 2nd sample at the end of the documentation works for me for each color.

I originally wrote this bug report on Apr 21, 2007 and the problem was fixed on Apr 23, 2007. On, Sep 11, 2009, a Guest poster just copied what I wrote. I did not re-report the problem. To be fair, I don't have any scripts that use the Color function but I assume the fixed function is still fixed.

Thanks for your help.
Back to top
View user's profile Send private message Send e-mail
majkinetor



Joined: 24 May 2006
Posts: 4116
Location: Belgrade

PostPosted: Sat Oct 31, 2009 6:19 pm    Post subject: Reply with quote

Ok, thx for clarification. I thought the bug is somehow hunging there for a long time but I didn't notice it somehow.
_________________
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3906
Location: Bremen, Germany

PostPosted: Mon Feb 22, 2010 8:08 am    Post subject: Reply with quote

Hi maj,

How do I use Dlg_Open() to select a folder? Is it feasible or should I use FileSelectFolder?
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
majkinetor



Joined: 24 May 2006
Posts: 4116
Location: Belgrade

PostPosted: Mon Feb 22, 2010 9:21 am    Post subject: Reply with quote

Its not feasible. BrowseForFolder system dialog can opet both files and folders ((BIF_BROWSEINCLUDEFILES flag) while Dlg_Open could so only if you select file inside the folder

Wrapper for system function isn't hard to make if you need better customization.


See this for more details:
http://msdn.microsoft.com/en-us/library/bb762115(VS.85).aspx
_________________
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3906
Location: Bremen, Germany

PostPosted: Mon Feb 22, 2010 5:32 pm    Post subject: Reply with quote

majkinetor wrote:
Wrapper for system function isn't hard to make if you need better customization.
Maybe for you. For me it is always hard to get started, specially since it requires structs.

What I read on that web page is that it requires COM to be started. I didn't read any further. Too much for me. For the time being I use FileSelectFolder. If you ever implement this SHBrowseForFolder I'll be happy to use it, though. :)
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3 ... , 9, 10, 11  Next
Page 10 of 11

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group