Jump to content

beginner needs badly help


Recommended Posts

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

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
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 :)

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

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

Enough on this ...  back on topic please!

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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 :<

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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