Search found 27 matches
- 22 Jun 2023, 14:23
- Forum: Ask for Help (v1)
- Topic: Script interaction with clipboard is funky
- Replies: 1
- Views: 192
Script interaction with clipboard is funky
This script is supposed to take the clipboard which has a bit of json-formatted text, strip out formatting like tabs and commas and quotes, show the result and then allow me to paste the reformatted text wherever (like excel) The problem I am having is that the little GUI will often show old clipboa...
- 10 Oct 2022, 18:03
- Forum: Ask for Help (v1)
- Topic: Need Help with Script for Cleaning up JSON Files for pasting
- Replies: 5
- Views: 412
Re: Need Help with Script for Cleaning up JSON Files for pasting
Ok that regex command worked, thanks! final script- !+g:: SplashTextOn ,,,Working, ClipWait, 0 Sleep, -1 If !ErrorLevel { Clipboard := RegExReplace(Clipboard, "m`a)(,|""|^ +)") } Else MsgBox, 48, Error, An error occurred while waiting for the clipboard. SplashTextOff Run, C:\Windows\Notepad.exe WinW...
- 06 Oct 2022, 11:46
- Forum: Ask for Help (v1)
- Topic: Need Help with Script for Cleaning up JSON Files for pasting
- Replies: 5
- Views: 412
Re: Need Help with Script for Cleaning up JSON Files for pasting
Thanks, that looks helpful. However, Trim does not seem to work, the only line that gets trimmed is the first line and all subsequent lines still have leading spaces Also, it seems like you strip the clipboard and then send CTRL+C, so the window with the selected text still needs to be in focus when...
- 05 Oct 2022, 17:11
- Forum: Ask for Help (v1)
- Topic: Need Help with Script for Cleaning up JSON Files for pasting
- Replies: 5
- Views: 412
Need Help with Script for Cleaning up JSON Files for pasting
I find myself needing to remove the quotes, commas and leading spaces from JSON files for pasting into excel over and over. I am trying to do it with autohotkey but I am really just a hack and can't quite get the leading spaces to be removed. Also, something about my script is causing some instabili...
- 20 Apr 2021, 22:54
- Forum: Ask for Help (v1)
- Topic: Add the same bit of text to multiple cells taken from Excel
- Replies: 1
- Views: 126
Add the same bit of text to multiple cells taken from Excel
I will have multiple rows of some string of text, might be email addresses or part numbers. I want to be able to add text around the values in those cells and store all the new text in the clipboard (for pasting into SQL). Below would be the rows of data from Excel: PN1 PN2 PN3 PN4 Copy those cells ...
- 23 Nov 2020, 12:56
- Forum: Ask for Help (v1)
- Topic: Script pasting clipboard into Excel is pasting as a picture
- Replies: 0
- Views: 200
Script pasting clipboard into Excel is pasting as a picture
Any ideas why this script is pasting the clipboard into excel as a picture? oExcel := ComObjCreate("Excel.Application") ; create Excel Application object sleep, 4000 oExcel.Workbooks.Add ; create a new workbook (oWorkbook := oExcel.Workbooks.Add) oExcel.Visible := 1 ; make Excel Application Visible ...
- 08 Oct 2020, 19:11
- Forum: Ask for Help (v1)
- Topic: Take a string and reformat it from clipboard into a file path Topic is solved
- Replies: 8
- Views: 756
Re: Take a string and reformat it from clipboard into a file path Topic is solved
Thanks, the second version works great. I replaced the message box with
Clipboard := file
since I will be pasting the path into file explorer
Clipboard := file
since I will be pasting the path into file explorer
- 08 Oct 2020, 15:16
- Forum: Ask for Help (v1)
- Topic: Take a string and reformat it from clipboard into a file path Topic is solved
- Replies: 8
- Views: 756
Take a string and reformat it from clipboard into a file path Topic is solved
I'll be copying text that will follow a similar format i.e. AB-XXXYYYY-ZZ, where XXXYYYY can be a variable number of numbers, but usually 6-8 digits. Once it is in the clipboard, I want to run my script to pull the XXXYYYY part from the copied text, and then reformat it into a file path e.g. path\pa...
- 16 Oct 2018, 18:09
- Forum: Ask for Help (v1)
- Topic: ControlSend pressing Shift during send?
- Replies: 3
- Views: 941
Re: ControlSend pressing Shift during send?
I was able to make it more reliable by adding SetKeyDelay, but it still fails for some inputs when my computer hangs up trying to access the network folder locations. Maybe make the SetKeyDelay longer or the press longer? #NoEnv ; Recommended for performance and compatibility with future AutoHotkey ...
- 16 Oct 2018, 17:18
- Forum: Ask for Help (v1)
- Topic: ControlSend pressing Shift during send?
- Replies: 3
- Views: 941
ControlSend pressing Shift during send?
I'm using COM to send values from Excel into the command prompt, and sometimes during ControlSend, it appears that AHK is pressing shift. For example, start %windir%\explorer.exe is getting sent as start %windir5|explorer.exe The full code I am sending is below. Is there some kind of Send parameter ...
- 15 Oct 2018, 14:38
- Forum: Ask for Help (v1)
- Topic: Script is adding decimal and zeroes from nowhere
- Replies: 1
- Views: 426
Script is adding decimal and zeroes from nowhere
i'm trying to write a script that will take a column of values in Excel and then paste them into individual browser windows at the end of a url string. When AHK is pasting the values, it is adding a decimal and a string of zeros. I've tried adjusting the format of the cells in Excel, but that isn't ...
- 07 Dec 2017, 13:02
- Forum: Ask for Help (v1)
- Topic: Hotkeys for Outlook formatting - is there a better way?
- Replies: 2
- Views: 561
Re: Hotkeys for Outlook formatting - is there a better way?
This turned out to be a better way. Usually when I press ALT by itself in Outlook, a series of icons with characters pops up indicating which keyboard character corresponds to each option in the toolbar or menu. However, it didn't seem to work with AHK. So I tried this instead, and it works pretty w...
- 06 Dec 2017, 19:09
- Forum: Ask for Help (v1)
- Topic: Hotkeys for Outlook formatting - is there a better way?
- Replies: 2
- Views: 561
Hotkeys for Outlook formatting - is there a better way?
Here is an example of what I am trying to do - this is the set of keyboard shortcuts necessary to highlight text yellow. I am wondering if there is a better way, perhaps through COM? I have a few others I want to do, like change the font color, and erase formatting. !+h:: IfWinActive, Outlook { Send...
- 25 Oct 2017, 13:32
- Forum: Ask for Help (v1)
- Topic: How to save as cript and recompile?
- Replies: 5
- Views: 947
Re: How to save as cript and recompile?
I'm compiling so I can have an executable file in the startup folder.
- 25 Oct 2017, 13:17
- Forum: Ask for Help (v1)
- Topic: How to save as cript and recompile?
- Replies: 5
- Views: 947
How to save as cript and recompile?
Wondering if there is already something out there that can do this- I have a script that is compiled and always running in the background. I edit the script and make some changes. Currently, I save the script, go to the tray, and exit the .exe version of the script. Then I go to the desktop, delete ...
- 18 Oct 2017, 13:29
- Forum: Ask for Help (v1)
- Topic: How to combine multiple scripts in one?
- Replies: 11
- Views: 21297
Re: How to combine multiple scripts in one?
Fair enough, perhaps I can rephrase and add some accuracy to my question. I have a script that is compiled on the desktop with a shortcut in the startup folder. That script has quite a few different hotkeys in it that I like to all have available while I am working. I was hoping to assign a variable...
- 17 Oct 2017, 13:00
- Forum: Ask for Help (v1)
- Topic: How to combine multiple scripts in one?
- Replies: 11
- Views: 21297
Re: How to combine multiple scripts in one?
From the sounds of it in this thread, there is no way to have a "global" variable that can be used in one script that contains multiple hotkeys. I use one script to run a bunch of different hotkeys that are located in the startup folder, and one of the things that I was hoping to do is assign a vari...
- 11 Oct 2017, 13:47
- Forum: Ask for Help (v1)
- Topic: Search Outlook by category through COM
- Replies: 0
- Views: 378
Search Outlook by category through COM
I'm trying to create a hotkey to display emails by category in Outlook. I could do it like thisjust by sending ^e, then sending the search term category:="ToDos" Send, ^e Sleep, 1000 ; or however long it takes for Outlook to respond Send, category:="ToDos" However, I'm trying to learn more about usi...
- 05 Oct 2017, 17:27
- Forum: Ask for Help (v1)
- Topic: How to remove blank cells from the specific column in MS Excel?
- Replies: 24
- Views: 5232
Re: How to remove blank cells from the specific column in MS Excel?
Allright! I think I got it. This works (or at least I can now get my data to appear in notepad, which means I can play with it in other ways. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. Send...
- 05 Oct 2017, 13:11
- Forum: Ask for Help (v1)
- Topic: How to remove blank cells from the specific column in MS Excel?
- Replies: 24
- Views: 5232
Re: How to remove blank cells from the specific column in MS Excel?
I'm getting this error message now when I run the script-
Error: 0x800A03EC -
Source: (null)
Description: (null)
HelpFile: (null)
HelpContext: 0
Specifically: Range
Then it points to the line
Error: 0x800A03EC -
Source: (null)
Description: (null)
HelpFile: (null)
HelpContext: 0
Specifically: Range
Then it points to the line
Code: Select all
for Cell in Xl.Range("A1:A100").Cells