Search found 355 matches

by paik1002
09 Jul 2020, 07:48
Forum: Ask For Help
Topic: How to add weeks to a date
Replies: 5
Views: 1846

How to add weeks to a date

How do I add weeks to a given date, say date_given?

I would like to implement the equivalent of following VBA function:

DateAdd("ww", 4, date_given)

This function adds 4 weeks to date_given.

https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/dateadd-function
by paik1002
19 May 2020, 19:46
Forum: Ask For Help
Topic: MS Outlook ComObjActive Error: 0x800401E3
Replies: 3
Views: 330

Re: MS Outlook ComObjActive Error: 0x800401E3

try objOutlook := ComObjActive("Outlook.Application") See also Dealing with COM errors . try { objOutlook := ComObjActive("Outlook.Application") msgbox "try" } catch { msgbox "catch" } GEV, runing this code outputs "catch". I am stuck not able to use ComObjActive, ComObjCreate, or any other COMs fo...
by paik1002
07 May 2020, 20:06
Forum: Ask For Help
Topic: MS Outlook ComObjActive Error: 0x800401E3
Replies: 3
Views: 330

MS Outlook ComObjActive Error: 0x800401E3

Error: 0x800401E3 I am getting this error pointing to the code, objOutlook := ComObjActive("Outlook.Application") The code worked in 64 bit Windows 7, but stopped working in 64 bit Windows 10. -64 bit Windows 10 -AHK running in admin mode -AHK startup at (\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Mic...
by paik1002
08 Apr 2019, 00:58
Forum: Ask For Help
Topic: Saving stdout to a file for a command line executed program via Runwait
Replies: 3
Views: 595

Re: Saving stdout to a file for a command line executed program using Runwait

Thanks. This works fine: RunWait %ComSpec% /c "dir >> C:\stdout.txt" But these do not seem to work(An empty stdout.txt file is produced): RunWait %ComSpec% /c "gm.exe convert testing.pdf testing.jpg >> C:\stdout.txt" RunWait %ComSpec% /c "gm.exe convert >> C:\stdout.txt" RunWait %ComSpec% /c "gm.exe...
by paik1002
08 Apr 2019, 00:14
Forum: Ask For Help
Topic: Saving stdout to a file for a command line executed program via Runwait
Replies: 3
Views: 595

Saving stdout to a file for a command line executed program via Runwait

RunWait, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID] I am trying to make a log file. How do I save the output of a command line executed command to a file, say stdout.txt? Please kindly refer to the pseudo code below(not working). RunWait, gm.exe convert testing.pdf testing.jpg ...
by paik1002
04 Apr 2019, 03:02
Forum: Ask For Help
Topic: Size of array after stringsplit Topic is solved
Replies: 6
Views: 1126

Re: Size of array after stringsplit Topic is solved

Thanks you and it works!
by paik1002
04 Apr 2019, 02:28
Forum: Ask For Help
Topic: Size of array after stringsplit Topic is solved
Replies: 6
Views: 1126

Size of array after stringsplit Topic is solved

How do get the size of the array after stringsplit?

Code: Select all

StringSplit,myArray,Clipboard,`n,`r
msgbox % myArray.MaxIndex()	; size of myArray
by paik1002
04 Apr 2019, 01:23
Forum: Ask For Help
Topic: Detecting encrypted PDF files
Replies: 4
Views: 849

Re: Detecting encrypted PDF files

Thanks, but I am getting an error message: Call to nonexistent function.

StdOut:= StdOutToVar(CmdString)
by paik1002
03 Apr 2019, 23:56
Forum: Ask For Help
Topic: Detecting encrypted PDF files
Replies: 4
Views: 849

Detecting encrypted PDF files

Is there a simply way to detect encrypted PDF files?

Please refer to the provided attachment.
by paik1002
29 Mar 2019, 08:13
Forum: Ask For Help
Topic: searching subfolders in ascending/descending order of modified time
Replies: 1
Views: 405

searching subfolders in ascending/descending order of modified time

How do I search pdf files in each subfolder, wherein the subfolders are searched by their ascending/descending order of modified time? Example: folder having the most recently modified time is search first (descending time order). Loop Files,C:\myfolder\*.pdf,R ; Recurse into subfolders. { if instr(...
by paik1002
29 Mar 2019, 06:24
Forum: Ask For Help
Topic: multifuntional hotkey using keywait Topic is solved
Replies: 2
Views: 521

multifuntional hotkey using keywait Topic is solved

The short press mode works fine, but the long press mode seems to re-trigger the short press mode. I would like to modify the following code such that long and short presses do not interfere with each other. Help would be appreciated. P.S. I would also like to extend it to include a double press mod...
by paik1002
26 Mar 2019, 10:57
Forum: Ask For Help
Topic: Clipboard is not pasting Topic is solved
Replies: 9
Views: 1680

Re: Clipboard is not pasting Topic is solved

^+!F12:: clipboard = ; start off empty to allow ClipWait to detect when the text has arrived. Send ^c ClipWait 2 ; wait max. 2 seconds for the clipboard to contain data If (!ErrorLevel) { clipboard = %clipboard% ; Convert any copied files, HTML, or other formatted text to plain text. Sleep, 300 ; o...
by paik1002
26 Mar 2019, 10:01
Forum: Ask For Help
Topic: Clipboard is not pasting Topic is solved
Replies: 9
Views: 1680

Re: Clipboard is not pasting Topic is solved

I'm able to paste the contents, but it tends to be contents from the previous press of the hotkey. I was able to solve it by emptying the clipboard before copying to it. That likely makes a difference because of the usage of ClipWait. ^+!F12:: clipboard = sendinput ^c ClipWait clipboard = %clipboar...
by paik1002
26 Mar 2019, 00:42
Forum: Ask For Help
Topic: Clipboard is not pasting Topic is solved
Replies: 9
Views: 1680

Re: Clipboard is not pasting Topic is solved

IMEime wrote:
25 Mar 2019, 23:00
iterate the process you wanted, once or several times
Clipboard is one Huge animal, not a simple toy
msgbox shows just fine without iteration.
by paik1002
26 Mar 2019, 00:41
Forum: Ask For Help
Topic: Clipboard is not pasting Topic is solved
Replies: 9
Views: 1680

Re: Clipboard is not pasting Topic is solved

try commenting out that line

- yes I tried it, but unfortunately it does not solve the problem.
by paik1002
25 Mar 2019, 20:27
Forum: Ask For Help
Topic: Clipboard is not pasting Topic is solved
Replies: 9
Views: 1680

Clipboard is not pasting Topic is solved

https://autohotkey.com/docs/misc/Clipboard.htm The manual states: clipboard = %clipboard% ; Convert any copied files, HTML, or other formatted text to plain text. ^+!F12:: { sendinput ^c ClipWait clipboard = %clipboard% ; Convert any copied files, HTML, or other formatted text to plain text. msgbox ...
by paik1002
21 Mar 2019, 05:23
Forum: Ask For Help
Topic: Matching a date using RegexMatch
Replies: 1
Views: 373

Matching a date using RegexMatch

How do I match a date that falls in a pre-defined range using a simple RegExMatch command? For example, the pre-defined date range could be: start date: 2018/12/1 end date: today Haystack := "2018/11/1 2019/03/21 2018/03/21 2019/3/20 2019/1/01 2019/05/1" NeedleRegEx := ??? RegExMatch(Haystack,Needle...
by paik1002
17 Mar 2019, 13:11
Forum: Ask For Help
Topic: SetTitleMatchMode RegEx applied only to directives
Replies: 2
Views: 660

SetTitleMatchMode RegEx applied only to directives

SetTitleMatchMode 2 is placed at the beginning of my script set as the default matching mode. However, is it possible to apply SetTitleMatchMode RegEx only to directives. In other words, I would like to partially match the window title for directives such as #IfWinActive , but not to titles for com...
by paik1002
10 Mar 2019, 07:11
Forum: Ask For Help
Topic: Detecting mouse button state when the ctrl key is pressed
Replies: 2
Views: 527

Detecting mouse button state when the ctrl key is pressed

How do I detect if mouse buttons are being pressed/unpressed AFTER the modifier key is pressed down? The native functions of the modifier and mouse buttons must be kept intack. ~*LControl:: { mouse_state := GetKeyState("WheelDown") GetKeyState("WheelUp") GetKeyState("WheelLeft", "P") GetKeyState("Wh...

Go to advanced search