Newbie help

Get help with using AutoHotkey and its commands and hotkeys
SteveB123
Posts: 14
Joined: 28 Jul 2020, 07:27

Newbie help

28 Jul 2020, 07:38

Hello I am a complete Newbie to AHK...

I am trying to create a script that:
a) copies a selected text
b) opens Microsoft Translator -- NOT the website but the Translator app build into Windows 10.
c) Select all in case there is previous content
d) past clipboard

thanks in advance, and take care

Steve
Last edited by SteveB123 on 28 Jul 2020, 07:50, edited 1 time in total.
MonuKashyap
Posts: 74
Joined: 06 Jun 2016, 21:32

Re: Newbie help

28 Jul 2020, 07:50

try this :

!q::
send ^c
run %path_of_translator%
Return

;;Press Alt+q to start..
SteveB123
Posts: 14
Joined: 28 Jul 2020, 07:27

Re: Newbie help

28 Jul 2020, 08:03

hello, thanks... however this did not work for me.

I am not sure where Translator is located in Windows 10 ....

should %path_of_translator% work, or do I need to add path ...

I have been able to get this to work for other programs and for websites ... but just not for Translator ...

thanks again

Steve
User avatar
boiler
Posts: 6845
Joined: 21 Dec 2014, 02:44

Re: Newbie help

28 Jul 2020, 08:22

You need to know the path of the translator app. Either assign the path to the variable path_of_translator, or put the path directly into the hotkey statement, like this:

Code: Select all

!q:: Run C:\Windows\System32\translator.exe
I haven’t installed the translator app, so I don’t know the actual path.
SteveB123
Posts: 14
Joined: 28 Jul 2020, 07:27

Re: Newbie help

28 Jul 2020, 09:51

hello... thanks: worked out a solution.. perhaps not very elegant but it seems to work: created a link on desktop and ran that: able to see target but cannot figure out how to run target ... But this is my first go at this :dance:

newbie thanks you....

Code: Select all

!q::
{
send ^c
Sleep 50
run C:\Users\sglof\Desktop\Translator.lnk
Sleep 70
send ^a
Sleep 50
send ^v
Return
}
;;Press Alt+q to start..
[Mod edit: [code][/code] tags added.]
User avatar
boiler
Posts: 6845
Joined: 21 Dec 2014, 02:44

Re: Newbie help

28 Jul 2020, 10:34

If you have a link, then you should be able to see the path to the exe file by right-clicking on it and viewing the properties.
SteveB123
Posts: 14
Joined: 28 Jul 2020, 07:27

Re: Newbie help

28 Jul 2020, 11:24

I did that and got: "Microsoft.BeingTranslator_8wekyb3d8bbwe!App"

But no matter what I did with this I could not get it to work.

tried

run %Microsoft.BeingTranslator_8wekyb3d8bbwe!App%

unfortunately I could not find this in a search Explore....

Steve
SteveB123
Posts: 14
Joined: 28 Jul 2020, 07:27

Re: Newbie help

28 Jul 2020, 12:03

just realized that Translator has to be open for my script to work.... if it is not open, Translator opens .... but then the Ctrl A etc. take place in the source document....
User avatar
boiler
Posts: 6845
Joined: 21 Dec 2014, 02:44

Re: Newbie help

28 Jul 2020, 12:18

SteveB123 wrote:
28 Jul 2020, 11:24
I did that and got: "Microsoft.BeingTranslator_8wekyb3d8bbwe!App"

But no matter what I did with this I could not get it to work.

tried

run %Microsoft.BeingTranslator_8wekyb3d8bbwe!App%

unfortunately I could not find this in a search Explore....

Steve
That’s not a file path. And if you do find the path, don’t put % signs around it. That’s for variable names.

Are saying that what’s under “Target:” in the “Shortcut” tab when viewing the properties of the translator shortcut?
SteveB123
Posts: 14
Joined: 28 Jul 2020, 07:27

Re: Newbie help

29 Jul 2020, 09:49

yes I realize that % was for variables but could think of nothing else....

and Yes that is the target .... but to create the desktop shortcut had to pull bar menu ... still cannot figure out the location of the exe and so the path ...

it works well enough for now ... I just have to remember to have the program running before I start to work ...

thanks for the help ... I am sure newbies like myself are a pain to the community ... sorry
User avatar
boiler
Posts: 6845
Joined: 21 Dec 2014, 02:44

Re: Newbie help

29 Jul 2020, 10:23

SteveB123 wrote:
29 Jul 2020, 09:49
I am sure newbies like myself are a pain to the community ... sorry
I’m not sure where this is coming from. The community happily helps a number new AHK users every day, and I attempt to contribute to that welcoming and helpful atmosphere. Was there something in my posts that came across as anything other than an earnest attempt to help find a solution to your issue?
SteveB123
Posts: 14
Joined: 28 Jul 2020, 07:27

Re: Newbie help

29 Jul 2020, 12:03

no, no, no.... you have misunderstood .... It was in NO way meant as a critique. I just feel bad taking up people's time with what must appear to be very simple questions .... I am using AHK because I moved from Mac to Windows and in Mac had a tool that made automating certain tasks very simple. From what I can see this is the best option but it does have a learning curve and I am trying to keep focused on my work and so do not have as much time as I need to learn the ins and outs of this .... especially given I only have a handful of needs....

So no criticism intended ,.... Just trying to imagine that such basic questions must be, well basic .... I am sure if I were to read long enough I would figure things out ... but I tried and tried to get it to work and could not ... so I very much appreciate the help ... sorry if that was not clear
User avatar
boiler
Posts: 6845
Joined: 21 Dec 2014, 02:44

Re: Newbie help

29 Jul 2020, 12:12

OK. Sorry to misinterpret. Don’t hesitate to ask questions.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], bonswouar, hasantr, MrCheeseman, RayB, TAC109, theon, vmech, XMCQCX and 36 guests