Search found 16 matches

by kwfine
23 Aug 2018, 05:54
Forum: Ask for Help (v1)
Topic: Need help to stop another excel file getting opened
Replies: 1
Views: 373

Need help to stop another excel file getting opened

Hi all, I have this AHK script running in my Windows 7. It opens a test1.xls file when I press the F2 key. The script is fine but there is a little problem: After a test1.xls has been opened, if I press the F2 key again, there will be another test1.xls opened. That means if I press the F2 key 4 time...
by kwfine
26 Jul 2018, 03:57
Forum: Ask for Help (v1)
Topic: When I tried to search a string in Clipboard, InStr() always returned 0
Replies: 2
Views: 1029

When I tried to search a string in Clipboard, InStr() always returned 0

Hi all, I stored about 18 lines of strings in clipboard, and tried to call InStr() to search the string, "this is me". But InStr() always returned 0. Here is the content stored in the clipboard: Example 1 MsgBox % InStr("123abc789","abc") ; Returns 4 ; Example 2 Haystack := "The Quick Brown Fox Jump...
by kwfine
20 Jul 2018, 14:04
Forum: Ask for Help (v1)
Topic: don't know how to format the whole excel worksheet in Text format
Replies: 1
Views: 482

don't know how to format the whole excel worksheet in Text format

Hi all, I have created an excel file and it is opened without any problem, but I don't know how to format all the cells in Sheet1 to the specific format, "Text" other than "General" path := "E:\test1.xls" sleep, 100 XL := ComObjCreate("Excel.Application") sleep, 100 XL.Workbooks.Open(path) sleep, 10...
by kwfine
18 Jul 2018, 10:32
Forum: Ask for Help (v1)
Topic: I am so confused why this is the only way to concatenate some text and clipboard
Replies: 2
Views: 4555

I am so confused why this is the only way to concatenate some text and clipboard

Hi all, I am using Version 1.1.25.01 in Windows 7. I have tried to concatenate some text and clipboard in AHK: Trial 1: clipboard ;clipboard = "英國語" finalString = "I am learning 日本語 and " %clipboard % Trial 2: clipboard ;clipboard = "英國語" finalString = "I am learning 日本語 and " + %clipboard % Trial 3...
by kwfine
01 Jul 2018, 14:47
Forum: Ask for Help (v1)
Topic: how come my AHK interpreted non integer character as integer
Replies: 1
Views: 499

how come my AHK interpreted non integer character as integer

Hi all, My AHK Version is 1.1.25.01. I am learning AHK. Here is my AHK codes: !h:: clipboard := "I am learning 日本語" word_array := StrSplit(clipboard) if word_array[15] is integer { msgbox, this is an integer msgbox % word_array[15] } return When I pressed the combo key to run the above AHK program, ...
by kwfine
30 Jun 2018, 12:43
Forum: Ask for Help (v1)
Topic: don't know how to paste a string into three different cells in the same row
Replies: 1
Views: 375

don't know how to paste a string into three different cells in the same row

Hi all, I am using AHK Version 1.1.25.01 in Windows 7. I am learning how to use AHK to paste some data into Excel. Here is the code: !h:: path := "C:\test1.xls" XL := ComObjCreate("Excel.Application") XL.Workbooks.Open(path) XL.Visible := True XL.Sheets(1).Range("A1:C1") := "1 2 3" When I pressed th...
by kwfine
03 Jun 2018, 13:01
Forum: Ask for Help (v1)
Topic: For a simple CTRL+AX, should I make it longer so that AHK will have enough time to process?
Replies: 1
Views: 794

For a simple CTRL+AX, should I make it longer so that AHK will have enough time to process?

Hi all, For a simple CTRL+AX, should I make it longer so that AHK will have enough time to process? I have used AHK for 2 years, but sometimes a simple code still confused me like this: Send, {CTRLDOWN}ax{CTRLUP} Sleep, 100 Send, {CTRLDOWN} Sleep, 100 Send, ax Sleep, 100 Send, {CTRLUP} Sleep, 100 OR...
by kwfine
03 Jun 2018, 12:56
Forum: Off-topic Discussion
Topic: Apart from accepting the best answer, is it alright if I quote the user's answer and say thank you?
Replies: 1
Views: 1114

Apart from accepting the best answer, is it alright if I quote the user's answer and say thank you?

Hi all, I asked a few questions here, and I found some of the answers are helpful. I want to say thank you to the users who have tried to help me out, but I think if I do it, my topic that is already solved will be pushed to the top, and confuse other users. I am not sure, please advise me! Thank yo...
by kwfine
03 Jun 2018, 12:07
Forum: Ask for Help (v1)
Topic: AHK did not press 70 UP keys for me Topic is solved
Replies: 4
Views: 917

AHK did not press 70 UP keys for me Topic is solved

Hi all, I am using Version v1.1.23.03 in WIndows 7 and 10. This is my custom simple function: test(howmany){ Send, {UP %howmany%} } but I found that, when I put in a large number, for example 70 as in test(70), AHK did not really press 70 UP keys for me. I figured out only 36 UP keys were pressed. C...
by kwfine
03 Jun 2018, 05:59
Forum: Ask for Help (v1)
Topic: I don't know the difference between `r and `n
Replies: 9
Views: 8307

I don't know the difference between `r and `n

Hi all, I wrote a simple code to help me copy things from Google news. The built-in code I used most was this: MouseClickDrag But sometimes MouseClickDrag copied some unwanted line break, to avoid this, I had added these two lines in my AHK codes: ;I copied these two lines from Google search Clipboa...
by kwfine
24 Jan 2018, 04:22
Forum: Ask for Help (v1)
Topic: Need help for a new key from user input
Replies: 6
Views: 1182

Re: Need help for a new key from user input

As far as i known you can only use a variable with the hotkey command: see : https://autohotkey.com/docs/commands/Hotkey.htm #Persistent InputBox, UserInput, Testing, `n`r(Choose a new key .), , 360, 200 MsgBox, You entered "%UserInput%" Hotkey, %UserInput%, RemapKey RemapKey: SendEvent {LButton} r...
by kwfine
23 Jan 2018, 04:59
Forum: Ask for Help (v1)
Topic: Need help for a new key from user input
Replies: 6
Views: 1182

Need help for a new key from user input

Hi all,

Recently, I wrote this script to help me remap my windows mouse left button, but some error happened.

Code: Select all

InputBox, UserInput, Testing,  `n`r(Choose a new key .), , 360, 200
MsgBox, You entered "%UserInput%"
UserInput::LButton
Can you help me please?

Kitty
by kwfine
21 Oct 2016, 15:02
Forum: Ask for Help (v1)
Topic: Function to eliminate unwanted spaces and numbers
Replies: 2
Views: 675

Function to eliminate unwanted spaces and numbers

Hi all, I am looking for a built-in function in AHK to help me eliminate some specifc characters (e.g. numbers, spaces, underscrope) in Clipboard. For example, I have copied some content like this: clipboard := 1 2 3 4 Hello world __ 4 3 2 1 I want to have this as output: Hello world I am a new user...
by kwfine
26 Mar 2016, 06:09
Forum: Ask for Help (v1)
Topic: is there a built-in function in AHK that will ignore some characters when Copy
Replies: 8
Views: 2314

Re: is there a built-in function in AHK that will ignore some characters when Copy

small example with stringreplace ;cl:=clipboard cl=Thanks, AHKScript Support Team(formerly The AutoHotkey Support Team) stringreplace,cl,cl,(,%a_space%,all stringreplace,cl,cl,),%a_space%,all msgbox,%cl% Hi garry, I see in your example that the functon, stringreplace is used two times before the br...
by kwfine
26 Mar 2016, 04:50
Forum: Ask for Help (v1)
Topic: is there a built-in function in AHK that will ignore some characters when Copy
Replies: 8
Views: 2314

is there a built-in function in AHK that will ignore some characters when Copy

Hi all, I am learning how to use AHK to copy the text in a web page. I have learnt from the AHK web site that the copied text will be stored in Clipboard when I highlight some text and choose Copy. Here is an example sentence of what I have copied from a web page: Thanks, AHKScript Support Team(form...

Go to advanced search