Jump to content

Help Creating hotkeys definition table.


Recommended Posts

What i want to do is to set a definition table for autoit to get .

I finally solved the language issue with a dummy file. But what im facing now is another whol different problem

I need to set something like this..

If "dummy.file exists" then

instead of "!{TAB}" do... "!{F}" <----crazy example

Endif

i need te set the code from my previous post to obey this scenario.

Btw, these hotkeys should only last till i end this function right ?

Could this be done ?

Any tips ?

Edited by LucasM
Link to comment
Share on other sites

$Code = "!{TAB}"
If FileExists("File path") then $Code = "{!F}"

And i don't know what your last post looks like so i can't help with that

And if im not wrong, hotkeys lasts until you end the program or reassign them

I belive this should assign F4 to do nothing.

HotKeySet("{F4},"")

[font="helvetica, arial, sans-serif"]Hobby graphics artist, using gimp.Automating pc stuff, using AutoIt.Listening to music, using Grooveshark.[/font]Scripts:[spoiler]Simple ScreenshotSaves you alot of trouble when taking a screenshot!Don't remember what happened with this, but aperantly the exe is all i got.If you don't want to run it, simply don't._IsRun UDFIt figures out if the script has ben ran before based on the info in a ini file.If you don't want to use exactly what i wrote, you can use it as inspiration.[/spoiler]

Link to comment
Share on other sites

Im having trouble understanding what you mean.

Assigning something with hotkeyset will not run the function until you press the button you assigned.

If you posted some more code so i can see in what you wanna do, its easier to help.

[font="helvetica, arial, sans-serif"]Hobby graphics artist, using gimp.Automating pc stuff, using AutoIt.Listening to music, using Grooveshark.[/font]Scripts:[spoiler]Simple ScreenshotSaves you alot of trouble when taking a screenshot!Don't remember what happened with this, but aperantly the exe is all i got.If you don't want to run it, simply don't._IsRun UDFIt figures out if the script has ben ran before based on the info in a ini file.If you don't want to use exactly what i wrote, you can use it as inspiration.[/spoiler]

Link to comment
Share on other sites

This is the exact same code for 2 different languages..

If you notice in the beggining of each code,.. the hotkeys...

Send("!h") and Send("!u") changes so they fit the different language... making the exact same thing

If FileExists("C:\Program Files\Internet Explorer\ 9es-ESes_ES.txt")Then

Sleep(2000)
Send("!h")
Sleep(2000)
Send("o")
Sleep(2000)
SplashTextOn("Beginning IE8 Tests", "Setting IE8 for the Tests...: Waiting Internet Options", 300, 100, -1, 0, 4)
WinWait("Opciones de Internet")
SplashTextOn("Beginning IE8 Tests", "Setting IE8 for the Tests...: Found Internet Options", 300, 100, -1, 0, 4)
Sleep(1000)
Send("!u")
Sleep(1000)
Send("{TAB 15}")
sleep(3000)
Send("{ENTER}")
Sleep(2000)
Send("{TAB 15}")
Sleep(3000)
Send("{RIGHT 2}")
sleep(1000)
Send("{TAB 1}")
sleep(1000)
Send("{UP 3}")
Sleep(1000)
Send("{TAB 7}")
Sleep(2000)
Send("{ENTER}")
Sleep(1000)
WinWait("Configuración del bloqueador de elementos emergentes")
Send("{TAB 3}")
Sleep(3000)
Send("{UP 2}")
Sleep(1000)
ControlCommand("Configuración del bloqueador de elementos emergentes", "Mostrar la barra de notificación cuando se bloquee un elemento emergente.", 5417, "UnCheck")
Sleep(2000)
Send("{ESC}")
Sleep(2000)
Send("{TAB 2}")
Sleep(2000)
Send("{ENTER}")
Sleep(2000)

Else

Sleep(2000)
Send("!t")
Sleep(2000)
Send("o")
Sleep(2000)
SplashTextOn("Beginning IE8 Tests", "Setting IE8 for the Tests...: Waiting Internet Options", 300, 100, -1, 0, 4)
WinWait("Internet Options")
SplashTextOn("Beginning IE8 Tests", "Setting IE8 for the Tests...: Found Internet Options", 300, 100, -1, 0, 4)
Sleep(1000)
Send("!c")
Sleep(1000)
Send("{TAB 15}")
sleep(3000)
Send("{ENTER}")
Sleep(2000)
Send("{TAB 15}")
Sleep(3000)
Send("{RIGHT 2}")
sleep(1000)
Send("{TAB 1}")
sleep(1000)
Send("{UP 3}")
Sleep(1000)
Send("{TAB 7}")
Sleep(2000)
Send("{ENTER}")
Sleep(1000)
WinWait("Pop-up Blocker Settings")
Send("{TAB 6}")
Sleep(3000)
Send("{UP 2}")
Sleep(1000)
ControlCommand("Pop-up Blocker Settings", "Show Notification Bar when a pop-up is blocked.", 5417, "UnCheck")
Sleep(2000)
Send("{TAB 5}")
Sleep(2000)
Send("{ENTER}")
Sleep(2000)
Send("{DOWN 3}")
Sleep(3000)
Send("{ENTER}")
Sleep(7000)

EndIf

now, I`ve tried posting

If fileexists then

hotkeys("!t","h") trying to replace "!t" for the second one.. but nothing happened. i guess im not getting how this function works.

Link to comment
Share on other sites

I`ve read somewhere the use of _ClipBoard_SetData or _ClipBoard_GetData ... including them in a clipboard.au3

But honestly, its the same i`ve being doing so far without using that function.

I need something to set the different meaning of the hotkeys in every function beggining.

????? any ideas ?

Link to comment
Share on other sites

now, I`ve tried posting

If fileexists then

hotkeys("!t","h") trying to replace "!t" for the second one.. but nothing happened. i guess im not getting how this function works.

Do you even know how hotkeyset work?

I suggest reading the help file on HotKeySet first, then come back and i'll try to help

[font="helvetica, arial, sans-serif"]Hobby graphics artist, using gimp.Automating pc stuff, using AutoIt.Listening to music, using Grooveshark.[/font]Scripts:[spoiler]Simple ScreenshotSaves you alot of trouble when taking a screenshot!Don't remember what happened with this, but aperantly the exe is all i got.If you don't want to run it, simply don't._IsRun UDFIt figures out if the script has ben ran before based on the info in a ini file.If you don't want to use exactly what i wrote, you can use it as inspiration.[/spoiler]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...