Search found 546 matches

by RobertL
08 Jul 2014, 22:28
Forum: Ask for Help (v1)
Topic: [Indierct]How to get current NumberType of SetFormat?
Replies: 9
Views: 3131

Re: How to get current NumberType of SetFormat?

So this should be simple. You already know what the NumberType is, because you explicitly changed the "Integer" number type with your first SetFormat call. So just change it back? OldFormat := A_FormatInteger ;Store the setting SetFormat, Integer, Hex ;Explicitly change the format of "Integer" Numb...
by RobertL
08 Jul 2014, 19:17
Forum: 脚本函数
Topic: \uxxxx 转换为中文 及 反向转换
Replies: 12
Views: 14709

Re: \uxxxx 转换为中文

tmplinshi wrote:str2u 函数名是我写的,函数内容我忘记是在哪看到的了 :lol:
上面帖子讨论出的结果正好包含这个写法,看来我们又重新实践了遍 :lol:
by RobertL
08 Jul 2014, 18:54
Forum: Ask for Help (v1)
Topic: [Indierct]How to get current NumberType of SetFormat?
Replies: 9
Views: 3131

Re: How to get current NumberType of SetFormat?

guest3456 wrote:Just post some example code of what you're trying to accomplish
See the top post updated.
by RobertL
08 Jul 2014, 09:42
Forum: 脚本函数
Topic: \uxxxx 转换为中文 及 反向转换
Replies: 12
Views: 14709

Re: \uxxxx 转换为中文

tmplinshi wrote:我也经常需要把 \uxxxx 转换为中文。
我去!我以为是爱尔兰之狐!原来是临时!代码果然优雅 :mrgreen:
还看不懂JavaEscapedToUnicode中的,回头分析。
空了多在论坛分享、讨论,AHK8也是~
by RobertL
08 Jul 2014, 09:30
Forum: Ask for Help (v1)
Topic: [Indirect way]Use expression to define InstanceVar in class?
Replies: 32
Views: 8952

Re: Use expression to define InstanceVar in class?

Is using the class syntax the only way to keep a function non-global? What does the class syntax translate into? Is the class syntax is the only way to encapsulate that function? I was finding it too. All functions are static in code. Functions in class is stored like className.MethodName . I just ...
by RobertL
08 Jul 2014, 09:20
Forum: Ask for Help (v1)
Topic: [Indierct]How to get current NumberType of SetFormat?
Replies: 9
Views: 3131

Re: How to get current NumberType of SetFormat?

guest3456 wrote:whats wrong with the built in variables?
See the top post updated.
by RobertL
08 Jul 2014, 08:13
Forum: AutoHotkey Development
Topic: Error: No object to invoke
Replies: 23
Views: 13419

Skip/disable/handle & Use default base

Is it possible error As an alternative option,Such as voting results? Yes, see You can still override the default base object 's meta-functions. Then could disable it or handle error (when access a string as object ) by themselves. I think to skip the error is fine, maybe user only want to determin...
by RobertL
08 Jul 2014, 07:55
Forum: Bug Reports
Topic: [no need to change]Variable names error in class define
Replies: 3
Views: 2375

Re: Variable names error in class define

Exception about "Invalid class variable declaration.": (just point out, I'm not suffer it ) class c{ a:=1, /b:=1 ;Invalid class variable declaration. } Thx. I didn't notice this, the contents of specifically information are on the same line, for continuation. Specifically: c{ /a := 1 This question i...
by RobertL
08 Jul 2014, 07:33
Forum: Ask for Help (v1)
Topic: [Indierct]How to get current NumberType of SetFormat?
Replies: 9
Views: 3131

[Indierct]How to get current NumberType of SetFormat?

How to get current NumberType of SetFormat ? For restore it later after some change before. There is only Built-in Variables A_FormatFloat , A_FormatInteger , no A_NumberType . Sample: ;Strore the setting OldFormat := A_FormatInteger OldNumberType:=??? ;Change SetFormat SetFormat, Integer, Hex ;Do s...
by RobertL
08 Jul 2014, 05:51
Forum: 脚本函数
Topic: \uxxxx 转换为中文 及 反向转换
Replies: 12
Views: 14709

Re: \uxxxx 转换为中文

以下部分转 至 AHK8相应帖子 ,不再更新以下部分。 概要解释: 通过函数 Asc 返回 字符 的 编码 (默认,十进制)→将 编码 由十进制 数值 转换至 十六进制 字符的 编码 →通过函数 Chr 将十六进制字符的 编码 转换为十六进制 字符 。 完整解释: while RegExMatch(cnStr, "[^\x20-\x7e]", ch) { ;查找所有非Ascii表中可打印的字符(即,所有需要转换的字符),并存储于ch。 ustr := Asc(ch), esc_ch := "\u", n := 12 ;字符串中第一个字符的(基于当前AHK编码(ANSI或Unicode,当前为U...
by RobertL
07 Jul 2014, 07:32
Forum: Ask for Help (v1)
Topic: remapping Alt while disabling AltTab function Topic is solved
Replies: 2
Views: 1220

Re: remapping Alt while disabling AltTab function Topic is solved

I don't sure. But try XButton2::Send {Alt} or specify LAlt RAlt instead of Alt in XButton2::.
by RobertL
07 Jul 2014, 07:25
Forum: Ask for Help (v1)
Topic: [Indirect way]Use expression to define InstanceVar in class?
Replies: 32
Views: 8952

[Indirect way]Use expression to define InstanceVar in class?

Using the {key:value} notation, quote marks are optional for keys which consist only of word characters. Any expression can be used as a key, but to use a variable as a key, it must be enclosed in parentheses. For example, {(KeyVar): Value} and {GetKey(): Value} are both valid. Documentation: Objec...
by RobertL
07 Jul 2014, 07:09
Forum: Bug Reports
Topic: [no need to change]Variable names error in class define
Replies: 3
Views: 2375

[no need to change]Variable names error in class define

class c{ ■:=1 ;Expected assignment or class/method definition. only in V1. ;Perhaps it should be "Invalid class variable declaration." (which occur when variable name "/a") a■:=2 ;Same error } ■:=3 ;fine a■:=4 ;fine I think the rule of variable name are the same as class variable as normal variable.
by RobertL
07 Jul 2014, 05:02
Forum: 脚本函数
Topic: \uxxxx 转换为中文 及 反向转换
Replies: 12
Views: 14709

谢谢分享,总结,进步。

Code: Select all

s:= A_TickCount
i:="\u7231\u5c14\u5170\u4e4b\u72d0"
;Loop Parse, %i%, u,\	;AHK V2写法
Loop Parse, i, u,\	;AHK V1写法
	o.=Chr("0x" A_LoopField)	;为字符串添加16进制前缀。字符=Chr(编码)。
e:= A_TickCount - s
MsgBox 耗时: %e% ms`n%o%
参见:AHK8.Wiki:字符、编码,转换
我不大懂你代码中的函数、用法.. :roll:

边学/边用,慢慢总结~没事回论坛转转~
by RobertL
06 Jul 2014, 22:59
Forum: AutoHotkey Development
Topic: Allow .Property / .Method() syntax within methods/functions
Replies: 15
Views: 7676

Another way to define and use relative reference

This conflicts with the continuation syntax. Lines beginning with any expression operator, including dot, are automatically appended to the previous line. Can add syntax, lines beginning with dot , previous line ending with comma (or any others like.. which CANT be appended to), preparse dot to thi...
by RobertL
06 Jul 2014, 06:14
Forum: AutoHotkey Development
Topic: Allow .Property / .Method() syntax within methods/functions
Replies: 15
Views: 7676

Another way?

Here we use the for loop to assign our object to a temporary variable and we can access it directly. SetUser(this,u,s,l){ for Each,_ in [ this[u].details ] _.Name:=u ,_.Status:=s ,_.LastActive:=l } I'm not sure if there's some skills. Why not use this ? SetUser(this,u,s,l){ _:=this[u].details _.Nam...
by RobertL
02 Jul 2014, 03:17
Forum: 相关工具
Topic: 自写小工具 多线程执行程序
Replies: 9
Views: 29639

Re: 自写小工具 多线程执行程序

linpinger wrote: 最新的H版 V1.1.15.0,貌似有个小问题, traytip没有显示气泡
是有这个问题,我去反应过,当时以为是我的问题,你可以再反馈下。

有个TrayTip的替代方案,是一个AHK库,具体我没用过,忘了貌似叫Notify.ahk。
都在H版那帖子里。
by RobertL
29 Jun 2014, 09:32
Forum: Ask for Help (v1)
Topic: Hotkey mapping, assign original key
Replies: 1
Views: 971

Re: Hotkey mapping, assign original key

Use Context-sensitive Hotkeys (see Mouse and Keyboard in contents of help). SetTitleMatchMode RegEx #IfWinActive ... #If ConditionFuntion() RButton:: ... #If Or, can just send LButton down? About Remapping keys and buttons When a script is launched, each remapping is translated into a pair of hotkey...
by RobertL
29 Jun 2014, 07:03
Forum: AutoHotkey Development
Topic: Error: No object to invoke
Replies: 23
Views: 13419

Re: Error: No object to invoke

Also may extend IsObject to support Variadic, like IsObject(A,B,C) to determine if all params are object within one call. IsObject already behaves like that. It can't be used in the manner you are thinking of because A, B and C each need to be fully evaluated before IsObject is called. For example,...
by RobertL
29 Jun 2014, 00:15
Forum: AutoHotkey Development
Topic: Error: No object to invoke
Replies: 23
Views: 13419

Re: Error: No object to invoke

Coco wrote: @Coco
I update my point and code in the latest one above. I think it's more persuasiveness and mature.
See a.b!=d / a.b=d / a.b="" and Default Base Object.
I will keep and then hide this post a little while.

Go to advanced search