I have a problem with this script in that the ^c doesn't do a clipboard copy in excel any ideas. I have an album database in Excel and when i press Ctrl Windows I it is supposed to copy the highlighted text and open discogs with this text in the clipboard. i tried sending F2 Shift Home ^C as well no luck. Please help. Thanks Mark
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Recommended for catching common errors.
; #SingleInstance Force
;SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SendMode Input
;SetTitleMatchMode, 2 ; Used to test what app you are in
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
^#i::
Send ^c
Run chrome.exe https://www.discogs.com/search/?q="%clipboard%"
Return
+#i::
Send ^c
Run chrome.exe https://www.discogs.com/search/?q="%clipboard%"
Return
^c not working in excel - discogs
-
- Posts: 12
- Joined: 21 May 2016, 14:25
- Location: Toronto, Canada
- FanaticGuru
- Posts: 1906
- Joined: 30 Sep 2013, 22:25
Re: ^c not working in excel
Code: Select all
^#i::
Send ^c
ClipWait
Run chrome.exe https://www.discogs.com/search/?q=`"%clipboard%`"
Return
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks
-
- Posts: 12
- Joined: 21 May 2016, 14:25
- Location: Toronto, Canada
Re: ^c not working in excel
thank you @FanaticGuru
Re: ^c not working in excel
You may want to restore the clipboard after use and you definitely want to empty it prior to using the command ClipWait, as it waits until the clipboard contains text which it may already do.
Code: Select all
^#i::Run, % """https://www.discogs.com/search/?q=" RegExReplace(Clip(), " ", "+") """"
Clip(wait := "", notonlytext := "") {
OldClip := Clipboardall
Clipboard := ""
Send, ^c
ClipWait, % wait, % notonlytext
clip := Clipboard
Clipboard := OldClip
Return clip
}
Please excuse my spelling I am dyslexic.
Re: ^c not working in excel
Some pro-bro in here might be willing/interested to create a little AHK wrapper to access discogs via its API ?!!
The Discogs API v2.0 is a RESTful interface to Discogs data. You can access JSON-formatted information about Database objects such as Artists, Releases, and Labels. Your application can also manage User Collections and Wantlists, create Marketplace Listings, and more.
https://www.discogs.com/developers/
The Discogs API v2.0 is a RESTful interface to Discogs data. You can access JSON-formatted information about Database objects such as Artists, Releases, and Labels. Your application can also manage User Collections and Wantlists, create Marketplace Listings, and more.
https://www.discogs.com/developers/