Search found 95 matches

by partof
17 Jul 2017, 05:50
Forum: Ask For Help
Topic: how to replace A or B or C by "1" ?
Replies: 4
Views: 455

Re: how to replace A or B or C by "1" ?

Thanks to Era_Scarecrow here is the answer:

Code: Select all

Unwrapped:=RegExReplace(Unwrapped, "(A|B|C)", "1")
or to search/replace for the word only:

Code: Select all

Unwrapped:=RegExReplace(Unwrapped, "(\bA\b|\bB\b|\bC\b)", "1")
by partof
17 Jul 2017, 03:10
Forum: Ask For Help
Topic: how to replace A or B or C by "1" ?
Replies: 4
Views: 455

Re: how to replace A or B or C by "1" ?

thank you for your reply but I don't understand it. Could you please give me an example of the syntax (replace A or B or C by "1")?
by partof
17 Jul 2017, 02:42
Forum: Ask For Help
Topic: how to replace A or B or C by "1" ?
Replies: 4
Views: 455

how to replace A or B or C by "1" ?

I kow how te replace a single instance:

Code: Select all

Unwrapped := RegExReplace(Unwrapped, "\bA\b" , "1")
But how can I replace several instance in one?

(\b is to match the whole word)


(I did not find the answer here https://autohotkey.com/docs/commands/StringReplace.htm )
by partof
09 May 2017, 02:08
Forum: Scripts and Functions
Topic: Run an app using escape key (Always run process hacker as admin)
Replies: 1
Views: 644

Run an app using escape key (Always run process hacker as admin)

Go in process hacker install folder. Check the box "run as admin" in the property (right click) of the ProcessHacker.exe. Then put shortcut.ahk :

Code: Select all

 ^+$Esc:: Run C:\Program Files\Process Hacker 2\ProcessHacker.exe
by partof
07 Feb 2017, 04:59
Forum: Ask For Help
Topic: Copy to clipboard & unwrap text (usefull for text from pdf) [solved]
Replies: 1
Views: 1218

Re: Copy to clipboard & unwrap text (usefull for text from pdf) [solved]

thanks! another one: ^!c:: ; CTRL(^)Alt(!) AND C shift(+) old := ClipboardAll clipboard := "" send ^c clipwait 0.1 if clipboard = clipboard := old else { tmp := RegExReplace(clipboard, "(\S.*?)\R(.*?\S)", "$1 $2") clipboard := tmp StringReplace clipboard, clipboard, % " ", % " ", A clipwait 0.1 } ol...
by partof
24 Jan 2017, 12:30
Forum: Scripts and Functions
Topic: a trick to prevent involuntary closing of the alert box (+HwndMyWinHwnd)
Replies: 1
Views: 342

a trick to prevent involuntary closing of the alert box (+HwndMyWinHwnd)

I'm using the code bellow which works as expected. It supposes to reminds me stuff when working on computer. But I'm usually writing, and the typing somehow close the windows. Adding a Sleep, 10000 (10sec) under the button ok seems to solve the issue. Gui,1: +AlwaysOnTop +ToolWindow +HwndMyWinHwnd G...
by partof
30 Sep 2016, 14:00
Forum: Ask For Help
Topic: AHK doesn't work for .docx opened in onedrive
Replies: 4
Views: 822

Re: AHK doesn't work for .docx opened in onedrive

Oups, I was also finding the question weird, now I feel so embarrassed... Sorry.

The problem disappeared. No idea why (same script, openened the same docx). I'll keep you updated if it comes again

Thanks for your help!

I had the problem with that script:

Code: Select all

!^+d::
   Send, ≠
Return
by partof
29 Sep 2016, 01:00
Forum: Ask For Help
Topic: AHK doesn't work for .docx opened in onedrive
Replies: 4
Views: 822

Re: AHK doesn't work for .docx opened in onedrive

just me wrote:What AHK script?
this is the extension of autohotkey script
by partof
25 Sep 2016, 06:38
Forum: Ask For Help
Topic: AHK doesn't work for .docx opened in onedrive
Replies: 4
Views: 822

AHK doesn't work for .docx opened in onedrive

For some mysterious reason my ahk script doesn't work when opening a https://onedrive.live.com when I edit the document in MSword (the docx are retrieved from the onedrive cloud and opened in MSword, as any docx). The same issue occur for all docx opened from onedrive. Other docx saved on my compute...
by partof
17 Mar 2016, 03:16
Forum: Scripts and Functions
Topic: open online doc in a tab (onedrive), while working on other tab or app. And open it in MS word
Replies: 0
Views: 381

open online doc in a tab (onedrive), while working on other tab or app. And open it in MS word

; EDIT your ONEDRIVE file; ; ; Run, C:\Program Files (x86)\Google\Chrome\Application\chrome.exe https://onedrive.live.com/view.aspx?resid=YOUR ID GOES HERE&app=Word&authkey=!YOUR KEY GOES HERE, , Max ;---------------------SHOW COUNT DONWN near the mouse Loop 20 { ToolTip, % 21 - A_Index ; if you ju...
by partof
17 Mar 2016, 01:41
Forum: Scripts and Functions
Topic: replace forbidden character when copy/past (files names issue)
Replies: 1
Views: 563

replace forbidden character when copy/past (files names issue)

!^+g:: ; Alt(!) CTRL(^) shift(+) G ---------------- replace \? <>/\\\*""|: by _ clipboard = ; empty clipboard Send, {CTRLDOWN}c{CTRLUP}{ESC} ; send the ctrl C command to copy text in clipboard ClipWait ; wait until there is something in clip bord Removesign := RegExReplace(clipboard, "[\? <>/\\\*""...
by partof
16 Jan 2016, 13:04
Forum: Ask For Help
Topic: multiple regex at one
Replies: 3
Views: 587

Re: multiple regex at one

AlphaBravo wrote:if I understood correctly
I think you got it right!

I tried you first code which works great! The second one however returns an empty variable.

Thanks a lot for your time and your help!
by partof
16 Jan 2016, 08:40
Forum: Ask For Help
Topic: multiple regex at one
Replies: 3
Views: 587

multiple regex at one

I would like to create replace all <p..."> by <p>, all <span..."> by span (and so on) ([ ...] can be any string). The regex would be this one: (<p .*?">)|(<blockquote.*?">)|(<span .*?">)|(<div .*?">)|(<a .*?">)|(<img .*?>)|(<h1 .*?">)|(<h2 .*?">)|(<label .*?">) (?1<p>)(?2<p>)(?3<span>)(?4<div>)(?5<a...

Go to advanced search