merry75

beginner needs badly help

17 posts in this topic

Hello guys,

I'm coming from ahk, and a script of mine is interfering with a third party software causing it to crash hence why i decided to try autoit to see if the error occurs too

the problem is I have absolutely no clue how autoit works and i was wondering if a kind soul could convert those ahk lines of code to autoit and show me the way for further steps ?

$c:: 
 {
   toggle:=!toggle
   if (toggle)
    {
      send, {c down}
    }
   else
    {
      send, {c up}
SoundPlay, %A_WinDir%\Media\Windows Ding.wav
    }
 }
return

$v::
 {
   toggle3:=!toggle3
   if (toggle3)
    {
      send, {v down}
    }
   else
    {
      send, {v up}
SoundPlay, %A_WinDir%\Media\tada.wav
    }
 }
return

$Space:: 
 {
   toggle1:=!toggle1
   if (toggle1)
    {
      send, {Space down}
    }
   else
    {
      send, {Space up}
SoundPlay, %A_WinDir%\Media\chord.wav
    }
 }
return

$x:: 
 {
   toggle2:=!toggle2
   if (toggle2)
    {
      send, {x down}
    }
   else
    {
      send, {x up}
SoundPlay, %A_WinDir%\Media\notify.wav
    }
 }
return

#persistent
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases_
#InstallKeybdHook
#UseHook
SetKeyDelay, 50, 50


$Numpad1::
{ 
send {s Down}
send {s Up}
}
return

$Numpad0::d
$Numpad3::F1
$End::h
$Numpad5::F2
$Numpad4::F4
$Numpadenter::F3
$Del::l

thanks alot in advance for your help

Share this post


Link to post
Share on other sites



merry75,

Welcome to the AutoIt forums. :)

 

I have absolutely no clue how autoit works

And yet you expect us to understand enough AHK to convert the code? Seems a little illogical to me. ;)

How about explaining what the code is supposed to do - then we might be able to puzzle out what it actually means. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Please read the documentation's (helpfile's) "Tutorial" section to understand AutoIt's syntax, you can learn AutoIt easily as you already understand AutoHotKey

TD :)


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

kind of dumb from me true :D

so to put it simple :

1 : basic key remapping

$Numpad0::d
$Numpad3::F1
$End::h
$Numpad5::F2
$Numpad4::F4
$Numpadenter::F3
$Del::l

2 : a little more tricky : when I press c once it's holding the c key down until i press c a second time which release the c key and send a sound with the soundplay line

$c:: 
 {
   toggle:=!toggle
   if (toggle)
    {
      send, {c down}
    }
   else
    {
      send, {c up}
SoundPlay, %A_WinDir%\Media\Windows Ding.wav
    }
 }
return
Edited by merry75

Share this post


Link to post
Share on other sites

merry75.

Look in the Help file for: :)

- 1. HotKeySet.

- 2. Send - but read the whole page as you want to hold the key down. ;)

 

a script of mine is interfering with a third party software

What is this "software"? if you still have the problem we might be able to suggest a workaround if we know what it is. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I used to use AHK a long while back, AutoIT is so much better with how the programing language works.

Other than what M23 has above the last thing you will need is SoundPlay() and you will want to look at AutoIT Macros for your paths.

https://www.autoitscript.com/autoit3/docs/macros.htm

Here is a snip I use from a GUI that has a music on/off button.

#Region Button13 Music
If $nMsg = $Button13 Then
    $sound += 1
    If Mod($sound, 2) = 0 Then
        SoundPlay("")
        Else
        SoundPlay(@TempDir & "\miketyson.mp3")
        EndIf
EndIf
#EndRegion Button13

miketyson.mp3

Edited by ViciousXUSMC

Share this post


Link to post
Share on other sites

Also remember that AutoHotKey was forked from AutoIt ;)

TD


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

correction - stolen. And lets not go there shall we?

:think: mmm making a statement and expecting nobody to respond.

Maybe not saying anything would have been better?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

stolen

I guess AutoIt was Open Source (GPL) when it was "stolen" ;)

TD


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

no i didnt , someone did it for me so let's be straightforward there i'm a noob when it comes to this , i was just hoping someone could do it for me and see if my problem is solved when i'm running it with auto it :<

Share this post


Link to post
Share on other sites

i dont have time nor i dont want to be taught this, i just need someone to do it for me, i will pay for it if someone is interrested give me a pm

Share this post


Link to post
Share on other sites

merry75,

 

i dont want to be taught

Fine. As you are not interested in learning the language there is no point in continuing - thread locked. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.