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 ... 7, 8, 9, 10, 11  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
majkinetor



Joined: 24 May 2006
Posts: 4114
Location: Belgrade

PostPosted: Wed Aug 06, 2008 11:21 am    Post subject: Reply with quote

Documentation->Save->Flags wrote:

nochangedir Restores the current directory to its original value if the user changed the directory while searching for files.


Quote:
Firstly if the user typed in a filename and extention the function would return a file with two extentions

Not confirmed.
_________________
Back to top
View user's profile Send private message
interactive dj



Joined: 03 Aug 2008
Posts: 2
Location: England

PostPosted: Thu Aug 07, 2008 10:20 am    Post subject: Reply with quote

Thank you - of course your are correct - I completly got focused on the problem of the change of working directory and didnt notice you had already provided a flag, sorry for your trouble on that point.

I await your conclusion on the double extension if you set a default and the use adds a different extension to the default
_________________
Regards
Martin
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 4114
Location: Belgrade

PostPosted: Thu Aug 07, 2008 10:58 pm    Post subject: Reply with quote

Quote:
I await your conclusion on the double extension if you set a default and the use adds a different extension to the default

I think i know what you are talking about and the same things happens with other programs such is Notepad. Its the behavior of Open/Save dialog box so its not a bug.
_________________
Back to top
View user's profile Send private message
skwire



Joined: 18 Jan 2006
Posts: 267
Location: Conway, Arkansas

PostPosted: Sun Feb 15, 2009 8:57 pm    Post subject: Reply with quote

maj, while working on Win98 support for Trout, it seems that the CmnDlg_Font returns 's1' for the font size no matter what is chosen. Other parts, such as the name and style seem to work properly. Is this something you can look into? Thanks.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
majkinetor



Joined: 24 May 2006
Posts: 4114
Location: Belgrade

PostPosted: Sun Feb 15, 2009 9:46 pm    Post subject: Reply with quote

No, I don't support dead systems, nor I have means to do it.
_________________
Back to top
View user's profile Send private message
skwire



Joined: 18 Jan 2006
Posts: 267
Location: Conway, Arkansas

PostPosted: Sun Feb 15, 2009 9:56 pm    Post subject: Reply with quote

No worries. I'll code around it. Thanks. =]
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Joy2DWorld



Joined: 04 Dec 2006
Posts: 537
Location: Galil, Israel

PostPosted: Mon Feb 16, 2009 2:28 am    Post subject: Reply with quote

skwire wrote:
maj, while working on Win98 support for Trout, it seems that the CmnDlg_Font returns 's1' for the font size no matter what is chosen. Other parts, such as the name and style seem to work properly. Is this something you can look into? Thanks.


seems like has to do with code being' too fancy'.


instead of just doing math via ahk , tried to use MULDIV dll call for division.

Quote:
MulDiv Function

The MulDiv function multiplies two 32-bit values and then divides the 64-bit result by a third 32-bit value. The return value is rounded up or down to the nearest integer.
Syntax

int MulDiv(
__in int nNumber,
__in int nNumerator,
__in int nDenominator
);

Parameters

nNumber [in]

Multiplicand.
nNumerator [in]

Multiplier.
nDenominator [in]

Number by which the result of the multiplication is to be divided.

Return Value

If the function succeeds, the return value is the result of the multiplication and division. If either an overflow occurred or nDenominator was 0, the return value is –1.
Requirements
Minimum supported client Windows 2000 Professional
Minimum supported server Windows 2000 Server
Header Winbase.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll
See Also

Large Integers
Int32x32To64
UInt32x32To64


since this isn't supported apparently in '98... gets not so nice result.



likely if you replace


Code:
pStyle .= "s" Abs(DllCall("MulDiv", "int", abs(s), "int", 72, "int", LogPixels))


with

pStyle .= "s" . floor( s * 72 / LogPixels)


or something like that,

might work for you.
_________________
Joyce Jamce
Back to top
View user's profile Send private message
Joy2DWorld



Joined: 04 Dec 2006
Posts: 537
Location: Galil, Israel

PostPosted: Mon Feb 16, 2009 2:30 am    Post subject: Reply with quote

majkinetor wrote:
No, I don't support dead systems, nor I have means to do it.



why is win'98 'Dead' ?


AHK supports it, no ?


if AHK supports it, then, therefore, it lives.



ps: sorry to say, but dead systems or not, the use of multdiv just wasn't coded right. part of the multdiv function is to return a possible ERROR value of -1, but the code IGNORES THAT. By simpling being aware of the error, and doing something if occurs, code can work with multdiv *and* still work on '98.... anyhow....
(well, assuming that is problem w/ '98, haven't tested nor looked too closely... )

note also, UNIX is ALIVE as is APPLE OS, and there are emulations for win'98 in both. working in '98 may allow for working in emulation mode on 'live system' etc... etc....


---> also there are some things cannot do in '98 and makes no sense to try. am not saying don't code for modern powers... just.... if easy to code for '98 as well... why not ?

but then again, what do I know.


ps: occasionally notice 'projects' put together with other's modules. when 'project' coder gives credit, seems usually 2/3rds (or so) of the project based on majkinetor's modules. nice.
_________________
Joyce Jamce
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 4114
Location: Belgrade

PostPosted: Mon Feb 16, 2009 10:26 am    Post subject: Reply with quote

Quote:
seems like has to do with code being' too fancy'.

instead of just doing math via ahk , tried to use MULDIV dll call for division.

The muldiv is not used for "fency" reasons, generally. Why would I use slow dll call instead integrated math if I don't have a reason. Everything involving LogPixel was Lexikos code.


2 Joy

The Win9x is dead to me Smile. And MS doesn't support it anymore.
And if AHK supports it does it mean that I have to support it ?

Quote:
ps: sorry to say, but dead systems or not, the use of multdiv just wasn't coded right. part of the multdiv function is to return a possible ERROR value of -1, but the code IGNORES THAT.

In AHK, you can regulary see that script ignores some or all of errors. But you are right, module shouldn't. In my code, I am sure there are lots of places where you can see that. Its not because I was lazy or I don't know that, but because taking into account every single error code is overwealming especially when you aren't sure if your primary thing will work. CmnDlg was one of the first modules if not first. At that time, my primary concern was to have it working and easy to use.
Thx for the info anyway. In v4 it definitely should proccess all error codes as it should work as integrated AHK function.


PS: I have no interest in updating the code. It works for me in 100% of cases. However, if you manage to do it, without influencing previous behavior, I will add it (so that ppl like Joyce James automating emulator can be happy Very Happy; [this was attempt to be funny])
_________________
Back to top
View user's profile Send private message
Guest






PostPosted: Mon Feb 16, 2009 12:20 pm    Post subject: Reply with quote

skwire wrote:
maj, while working on Win98 support for Trout, it seems that the CmnDlg_Font returns 's1' for the font size no matter what is chosen. Other parts, such as the name and style seem to work properly. Is this something you can look into? Thanks.

skwire, I suggested to majkinetor a fix to for this some time ago (but got his famous "Win98 is dead" reply).

If you are interested here is the code mod:
change this
Code:

CmnDlg_Font(ByRef pFace, ByRef pStyle, ByRef pColor, pEffects=true, hGui=0) {
   RegRead, LogPixels, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontDPI, LogPixels
   VarSetCapacity(SLogFont, 128, 0)

to this
Code:

CmnDlg_Font(ByRef pFace, ByRef pStyle, ByRef pColor, pEffects=true, hGui=0) {
   if A_OSVersion in WIN_95,WIN_98,WIN_ME                                    ; check if old win32 OS (win 95, 98, ME)
      RegRead, LogPixels, HKEY_CURRENT_CONFIG, Display\Settings, DPILogicalX            ; user DPI location
     ;RegRead, LogPixels, HKEY_LOCAL_MACHINE, Config\0001\Display\Settings, DPILogicalX ; machine default value is stored here
   else                                                             ; win2k or newer (vista untested)
      RegRead, LogPixels, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontDPI, LogPixels
   VarSetCapacity(SLogFont, 128, 0)


I have made this change in both CmnDlg and majkinetor's HexView, and both seem to work fine on win98 (including returning the correct font size).
Back to top
Drugwash



Joined: 08 Sep 2008
Posts: 608
Location: Ploiesti, RO

PostPosted: Mon Feb 16, 2009 4:19 pm    Post subject: Reply with quote

An If A_OSVersion/A_OSType / else statement can surpass any issues and keep both 9x and NT-based users happy. We (9x users) would greatly appreciate if these small corections/additions would be added to original scripts, be them majkinetor's or anybody else's.

Thank you everybody for your contributions!
Back to top
View user's profile Send private message Yahoo Messenger
majkinetor



Joined: 24 May 2006
Posts: 4114
Location: Belgrade

PostPosted: Mon Feb 16, 2009 4:46 pm    Post subject: Reply with quote

If guests solution is OK for you, Ill add it to the module (skwire, please check if it corrects your case)

Ty all.
_________________
Back to top
View user's profile Send private message
Drugwash



Joined: 08 Sep 2008
Posts: 608
Location: Ploiesti, RO

PostPosted: Mon Feb 16, 2009 11:00 pm    Post subject: Reply with quote

Sure, no problem, it would be appreciated.

There's one small issue I'd like to ask about: font encoding (Western, Central European, Japanese, BIG5, Cyrillic, etc). Is/will there be a way to change/save that setting too? I'm pushing hard tryin' to get some Unicode displayed in 9x as I know it can be done (through MSLU or cRichEdit).
Back to top
View user's profile Send private message Yahoo Messenger
skwire



Joined: 18 Jan 2006
Posts: 267
Location: Conway, Arkansas

PostPosted: Tue Feb 17, 2009 1:03 am    Post subject: Reply with quote

majkinetor wrote:
If guests solution is OK for you, Ill add it to the module (skwire, please check if it corrects your case)Ty all.

I can confirm it works in my Win98 VM, at least.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
majkinetor



Joined: 24 May 2006
Posts: 4114
Location: Belgrade

PostPosted: Tue Feb 17, 2009 12:25 pm    Post subject: Reply with quote

Drugwash, I don't want to lose time with that, its usability is limited to few people only, at least until there is an easy way to use unicode (either integrated, either via module) .

If you are really after creating Unicode app in ahk, Font dialog will be the least of your problems anyway.
_________________
Back to top
View user's profile Send private message
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 ... 7, 8, 9, 10, 11  Next
Page 8 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