Search found 22 matches

by zhanglei1371
08 Aug 2020, 23:03
Forum: Ask For Help
Topic: [Resolved]how to justice a file's encoding?
Replies: 5
Views: 1741

Re: how to justice a file's encoding?

I expected you are checking only the txt files, but anyway it doesn't seems to be an option for now. I looked little more and I found this tool called File it is basically a Linux tool, but a windows version was made, It determinate a file type (Including it encoding if it has). Read more here :arr...
by zhanglei1371
07 Aug 2020, 17:38
Forum: Ask For Help
Topic: [Resolved]how to justice a file's encoding?
Replies: 5
Views: 1741

Re: how to justice a file's encoding?

I attached you compiled executable from a cpp script named _GetEncoding.exe , place it in the same folder with your AHK script then specify the text file path that you are going to examine it encoding and run your script. It should give you a return value equal to 239 if it is UTF-8 text file or 97...
by zhanglei1371
07 Aug 2020, 11:07
Forum: Ask For Help
Topic: [Resolved]how to justice a file's encoding?
Replies: 5
Views: 1741

[Resolved]how to justice a file's encoding?

I want to know aTXT type file's encoding is UTF-8 or ansi
, how to organize the code?
thanks very much for the reply!
by zhanglei1371
16 May 2018, 18:35
Forum: Scripts and Functions
Topic: Get the URL of the current (active) browser tab
Replies: 138
Views: 81426

Re: Get the URL of the current (active) browser tab

Hi everyone,my browser is 360se,and the class is 360se6_Frame.
I used the code in page 1,then it poped the message:
"Not a browser or browser not supported (360se6_Frame)"
how to modify to fit the 360se?
Thx.
my brower download url:
http://down.360safe.com/se/360se9.1.0.420.exe
by zhanglei1371
15 May 2018, 07:35
Forum: Scripts and Functions
Topic: [FUNCTION] StdoutToVar with exit code
Replies: 30
Views: 14805

Re: [FUNCTION] StdoutToVar with exit code

burque505 wrote:Hi zhanglei1371, try this:

Code: Select all

#Include StdOutToVar.ahk
msgbox % StdoutToVar_CreateProcess("cmd.exe /c dir c:\")
This works too:

Code: Select all

msgbox % StdoutToVar_CreateProcess(Comspec " /c dir c:\")
Regards,
burque505
ManyThx,it works!
by zhanglei1371
07 May 2018, 18:23
Forum: Scripts and Functions
Topic: [FUNCTION] StdoutToVar with exit code
Replies: 30
Views: 14805

Re: [FUNCTION] StdoutToVar with exit code

I used the code below,but nothing get,why?

msgbox % StdoutToVar_CreateProcess("dir c:\")
but if I used :
msgbox % StdoutToVar_CreateProcess("ping www.baidu.com"),it works.
by zhanglei1371
27 Mar 2018, 07:20
Forum: Ask For Help
Topic: Why the Rbutton Can not popup?
Replies: 2
Views: 691

Re: Why the Rbutton Can not popup?

well,But still I find it doesn't work. I test the code below: RButton up:: MouseClick,right return when I run the code in a new script file ,then I fount the context menu didn't come up. why? it's a very strange puzzle. maybe My ahk_L's vesion? My ahk_L's version is the latest ,v1.1.28. What I want ...
by zhanglei1371
27 Mar 2018, 04:10
Forum: Ask For Help
Topic: Why the Rbutton Can not popup?
Replies: 2
Views: 691

Why the Rbutton Can not popup?

Hi everyone,I met a puzzle,in the code,I cannot get the rbutton popup,why? Thx for the help! #SingleInstance,force RButton & WheelUp:: tf=0 ToolTip,test001 return RButton & WheelDown:: tf=0 ToolTip,test002 return $RButton:: tf=1 Return $RButton Up:: if(tf=1) Send {RButton} ;MouseClick,right,0,0,1 el...
by zhanglei1371
21 Dec 2017, 03:37
Forum: Ask For Help
Topic: [solved]How to transform VBA code to AHK?
Replies: 3
Views: 858

How to transform VBA code to AHK?

Here is an untested start: xlApp := ComObjActive("Excel.Application") xlApp.Selection.TextToColumns(xlApp.Selection.Cells(1), 1, 1,,,,,,,,Array(1,2)) Also Excel assumes you want to work with the Excel application. With AHK you have to explicitely state that when you call methods. FG[/quote] Thx very...
by zhanglei1371
20 Dec 2017, 10:00
Forum: Ask For Help
Topic: [solved]How to transform VBA code to AHK?
Replies: 3
Views: 858

[solved]How to transform VBA code to AHK?

this is a vba code for convert digit value to Str.

Code: Select all

Selection.TextToColumns Destination:=Selection.Cells(1), DataType:=1, TextQualifier:=1, FieldInfo:=Array(1, 2)
but if i want to transform it to ahk,how to do ?
Thx.
by zhanglei1371
17 Dec 2017, 09:04
Forum: Ask For Help
Topic: Pass array from ahk to VBA
Replies: 0
Views: 411

Pass array from ahk to VBA

Hi Everyone,I have a puzzle that stuke me for a long time.I want interactive between Excel and AHK。when I want to pass the array object from ahk to vba,I failed.the code was below,so how to pass the array object between them ? =========================ahk====================== 5:: arr:=array("A","B"...
by zhanglei1371
22 Oct 2017, 05:13
Forum: 脚本函数
Topic: [H2] str() 字符串操作常用函数
Replies: 1
Views: 7049

Re: [H2] str() 字符串操作常用函数

不错,谢谢分享
by zhanglei1371
22 Oct 2017, 05:12
Forum: 脚本函数
Topic: 善用ahk,让strokeit在win10下起死回生
Replies: 5
Views: 9371

Re: 善用ahk,让strokeit在win10下起死回生

但这两个似乎都无法调用com,如word.application对象,若能就太好了
by zhanglei1371
20 Oct 2017, 10:10
Forum: Ask For Help
Topic: Problem about Pum_API function
Replies: 0
Views: 445

Problem about Pum_API function

hi everyone,I have a puzzle that when I use the tooltip in Pum,the popup menu cannot be disapeared after the tooltip . so how to solve the problem? [what I want is that when I click right button or Middle button,the whole Menu will disapeared just like when I click Left Button.] thanks for everyone!...
by zhanglei1371
09 Oct 2017, 08:40
Forum: Ask For Help
Topic: How to judge the Cursor state in ps? Topic is solved
Replies: 2
Views: 754

How to judge the Cursor state in ps? Topic is solved

I want to judge whether the cursor is in state of inputing,so I use the code below: #if A_cursor="IBeam" y::sendinput testword! #if But I found it didn't work in photoshop cs6. So I want know how to judge the cursor's state,if in input state ,do action 1,else,do action 2. Also in Office 2003,or othe...
by zhanglei1371
09 Oct 2017, 05:36
Forum: Ask For Help
Topic: need help for spacekey in ps
Replies: 3
Views: 819

Re: need help for spacekey in ps

well,the test code is below: ;==========global======= $Space::send {Space} Space & h::send {Left} Space & j::send {Down} Space & k::send {up} Space & l::send {Right} ;==========ps======= #If WinActive("ahk_class Photoshop") ~space::return #if ;===================== I found that if I use space & h in...
by zhanglei1371
09 Oct 2017, 00:41
Forum: Ask For Help
Topic: need help for spacekey in ps
Replies: 3
Views: 819

need help for spacekey in ps

Recently I met a puzzle in using photoshop6 . As I had made a key map with space: space::send {space} space & h::send {left} but I found that in ps I cant use space to scrab.I try to use ~space::return ,but found other programe was involved.Such as ppt,if I use space as hotkey,it wont work normally.
by zhanglei1371
30 Nov 2015, 23:13
Forum: Ask For Help
Topic: [Topic split] Modifiers and custom combos
Replies: 7
Views: 1975

Re: [Topic split] Modifiers and custom combos

Hi,everyone,is there a possible solution for this puzzle?

What I want is to get a confirmation。

if so ,I will give up it.
by zhanglei1371
30 Nov 2015, 07:21
Forum: Ask For Help
Topic: [Topic split] Modifiers and custom combos
Replies: 7
Views: 1975

Re: [Topic split] Modifiers and custom combos

Your questions are off-topic for the Bug Reports forum and the original thread in which you posted. I have split the posts into their own topic. As for your last question, I don't get what you mean. Sorry for my bad expression :oops: :oops: :oops: 。I will express my problem more detailed: I use thi...
by zhanglei1371
30 Nov 2015, 04:35
Forum: Ask For Help
Topic: [Topic split] Modifiers and custom combos
Replies: 7
Views: 1975

Re: #If bug maybe

... A modifier symbol isn't a modifier symbol if it's not modifying something. +!:: is Shift and literally the "!" symbol. The last question: I make the code below,I want to use shift to press different times to perform deferent function.and I give it a situation:ahk_class Notepad(or other similar ...

Go to advanced search