AutoHotkey Community

It is currently May 26th, 2012, 6:26 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 157 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10, 11  Next
Author Message
 Post subject:
PostPosted: August 6th, 2008, 11:21 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 7th, 2008, 10:20 am 
Offline

Joined: August 3rd, 2008, 11:16 am
Posts: 2
Location: England
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 7th, 2008, 10:58 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2009, 8:57 pm 
Offline

Joined: January 18th, 2006, 7:39 am
Posts: 274
Location: Conway, Arkansas
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2009, 9:46 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
No, I don't support dead systems, nor I have means to do it.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2009, 9:56 pm 
Offline

Joined: January 18th, 2006, 7:39 am
Posts: 274
Location: Conway, Arkansas
No worries. I'll code around it. Thanks. =]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 16th, 2009, 2:28 am 
Offline

Joined: December 4th, 2006, 10:35 am
Posts: 561
Location: Galil, Israel
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 16th, 2009, 2:30 am 
Offline

Joined: December 4th, 2006, 10:35 am
Posts: 561
Location: Galil, Israel
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 16th, 2009, 10:26 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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 :). 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 :D; [this was attempt to be funny])

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 16th, 2009, 12:20 pm 
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).


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 16th, 2009, 4:19 pm 
Offline
User avatar

Joined: September 8th, 2008, 12:26 am
Posts: 1048
Location: Ploieşti, RO
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!

_________________
AHK tools by Drugwash (AHK 1.0.48.05 and Win98SE)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 16th, 2009, 4:46 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
If guests solution is OK for you, Ill add it to the module (skwire, please check if it corrects your case)

Ty all.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 16th, 2009, 11:00 pm 
Offline
User avatar

Joined: September 8th, 2008, 12:26 am
Posts: 1048
Location: Ploieşti, RO
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).

_________________
AHK tools by Drugwash (AHK 1.0.48.05 and Win98SE)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 17th, 2009, 1:03 am 
Offline

Joined: January 18th, 2006, 7:39 am
Posts: 274
Location: Conway, Arkansas
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 17th, 2009, 12:25 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 157 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10, 11  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Apollo, Google Feedfetcher, Jaaaaaaaaay and 9 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Group