Search found 509 matches

by noname
07 Dec 2013, 07:12
Forum: Ask For Help
Topic: simple function works in ahk basic but not in ahk unicode
Replies: 16
Views: 3501

Re: simple function works in ahk basic but not in ahk unicod

@tmplinshi

I think i will take a closer look at RTrim ,i always ignored it because i just moved from basic to ahk_l but as you shown it can give creative solutions to a problem :)
by noname
07 Dec 2013, 07:05
Forum: Ask For Help
Topic: Control get type using hwnd Topic is solved
Replies: 2
Views: 1425

Re: Control get type using hwnd Topic is solved

You can find a function that will get it inside the forum post from VxE. ;http://www.autohotkey.com/board/topic/45515-remap-hjkl-to-act-like-left-up-down-right-arrow-keys/#entry283368 GetClassName( hwnd ) { ; returns HWND's class name without its instance number, e.g. "Edit" or "SysListView32" VarSe...
by noname
06 Dec 2013, 15:08
Forum: Ask For Help
Topic: simple function works in ahk basic but not in ahk unicode
Replies: 16
Views: 3501

Re: simple function works in ahk basic but not in ahk unicod

TrimZeros(number){ return (SubStr(number,1,-1)=number?RegExReplace(number,"\.?0+$"):number) } Very clever Afterlemon ! Simple and effective. I only hope that the problem does not arise from the mixing strings and numbers going from ahk basic to ahk_l because that will give other surprises in the od...
by noname
06 Dec 2013, 11:54
Forum: Ask For Help
Topic: simple function works in ahk basic but not in ahk unicode
Replies: 16
Views: 3501

Re: simple function works in ahk basic but not in ahk unicod

Yes that converts correct but it looks odd....... :) .It is frustrating that such a simple code for a yet unknown reason does not work. Following your remark about removing the dot when there are no 0 following i tried with regex and came up with the following function. RemoveTrailingZeros(number) {...
by noname
06 Dec 2013, 08:32
Forum: Ask For Help
Topic: simple function works in ahk basic but not in ahk unicode
Replies: 16
Views: 3501

Re: simple function works in ahk basic but not in ahk unicod

Thanks Pulover but it needs also correction for the case like number:=100 it will be converted to 1 using RTrim.

It would be not to difficult to do but i wonder why the original coe fails in ahk_l, i do not see why it works in ahk basic but not in ahk_l and even more just crashes the program?
by noname
06 Dec 2013, 06:51
Forum: Ask For Help
Topic: simple function works in ahk basic but not in ahk unicode
Replies: 16
Views: 3501

simple function works in ahk basic but not in ahk unicode

number:=17.0023000 msgbox % RemoveTrailingZeros(number) RemoveTrailingZeros(number) { StringTrimRight n, number, 1 If (n - number <> 0) ; not numbers: "" <> 0 Return number Return RemoveTrailingZeros(n) } If i use it in ahk unicode the script exits without even the msgbox but i cannot find why.It w...
by noname
06 Dec 2013, 03:18
Forum: Scripts and Functions
Topic: [LIB] EWinHook - SetWinEventHook implementation
Replies: 19
Views: 7572

Re: [LIB] EWinHook - SetWinHookEvent implementation

Thanks for sharing i use wineventhook a lot so this code will make it a lot easier! Do you have any idea why the "EVENT_SYSTEM_SOUND " does not seem to be triggered by anything?From the documentation is seems to be straight forward but i tried it with a lot of different sound generating programs/cod...
by noname
19 Nov 2013, 11:16
Forum: Ask For Help
Topic: inputbox syntax error
Replies: 2
Views: 1166

Re: inputbox syntax error

Thanks gregster you saved my day! I had been misinterpreting the old reply given on the forum where the parameter was the literal word blank but it was just to indicate it must be blank it was not code to be used.The original code problem was a missing "," !

Thanks for the quick reply.
by noname
19 Nov 2013, 09:25
Forum: Ask For Help
Topic: inputbox syntax error
Replies: 2
Views: 1166

inputbox syntax error

InputBox, String, Send command, Enter a command, , 200, 100,100,100, blank, 5,goto there I need the timeout function but cannot get past the "font" parameter.Using space or just leaving it blank gives same errror. ahk version 1.1.10.01 I found on the forum a similar problem and the solution seemed ...

Go to advanced search