Jump to content

Search the Community

Showing results for tags 'autohotkey'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 3 results

  1. back when I was still doing autohotkey you could write (in code) spanisha::á and whenever you were in google docs or notepad you could type (in the document) spanisha and it instantly turns it into á I tried doing this in autoit, here's what I have so far (my entire code so if this language requires a main function or a return/exit to function properly please let me know): ;is this a proper comment? HotKeySet ( "spanisha" , "SendAltered" ) Func SendAltered() Send("á", flag = 0); EndFunc I assume that autoit follows a sort of contemporary hotkey pressing model where you have to hold all keys at the same time? which makes this impossible. So I'm wondering if anyone has a workaround for this? or maybe an alternative to HotKeySet() I have a vague memory of someone saying that doing something like spanisha:á would work. I don't know if I'm slightly off syntax but this doesn't work. Also I tried doing ;is this a proper comment? ;HotKeySet ( "a" , "SendAltered" ) ;spanisha::á Func SendAltered() Send("á"); EndFunc just to try and debug, I'm also wondering if my approach is fundamentally wrong since HotKeySet() was made for something like !^A. Or if Send() is syntactically wrong. I'm also noticing on these forums that specifying installation is important so to whom it may concern I downloaded both installers, editor and main files. Although I'm about to be real mad if the editor installation makes a difference.
  2. Hello everyone, I decided to rewrite/convert some autohotkey scripts to autoit. I know Ahk pretty well, but I'm obviously new at autoit. I've done my best with this one and the problem I'm getting now is the error message "Error: Unknown function name". Forgive me if it's something simple, but like I said, I'm completely new at this (been at it for one day, while ahk for years). Here is the autoit script: #RequireAdmin If WinExists(@ScriptName) Then Exit AutoItWinSetTitle(@ScriptName) $slowness = IniRead ("extra.ini", "slownesss", slowness, "0") $slowdelay = IniRead ("extra.ini", "slownesss", slowdelay, "0") Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{DELETE}", "Terminate") $track = 0 while 1 global $pos2 = mousegetpos() Local $coord1 = PixelSearch (511, 388, 511, 424, 0xBD302E, 30) If Not @error Then exitloop EndIf wend For $redloop = 1 to 10 step 1 global $pos2 = mousegetpos() local $coord2 = PixelSearch (511, 388, 511, 424, 0xBD302E, 30) If Not @error Then $track = 1 EndIf If @error Then ExitLoop EndIf If $redloop > 0 Then $fade = $redloop / 100 EndIf $move = $slowness + fade if $track = 1 Then global $pos1 = mousegetpos() $newx1 = $pos1-$xpos2 $newx2 = $pos2-$xpos1 $movex = $newx2/move _MouseMovePlus($movex,0) global $pos2 = mousegetpos() $track = 0 EndIf Next while 1 sleep 1 local $coord3 = PixelSearch (511, 388, 511, 424, 0xBD302E, 30) If @error Then exitloop EndIf WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) WEnd EndFunc ; mousemove------------------------------------------ Func _MouseMovePlus($X, $Y,$absolute = 0) global $MOUSEEVENTF_MOVE = 1 Local $MOUSEEVENTF_ABSOLUTE = 32768 DllCall("user32.dll", "none", "mouse_event", _ "long", $MOUSEEVENTF_MOVE + ($absolute*$MOUSEEVENTF_ABSOLUTE), _ "long", $X, _ "long", $Y, _ "long", 0, _ "long", 0) EndFunc Func Terminate() Exit 0 EndFunc And here is the original Ahk script which I wrote (and works perfectly) : #SingleInstance force CoordMode, pixel,screen CoordMode, mouse,screen SetBatchLines -1 IniRead, slowness, extra.ini, slownesss, slowness IniRead, slowdelay, extra.ini, slownesss, slowdelay mouseXY(x,y) { DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0) } track = 0 loop { mousegetpos, xpos2, ypos2 PixelSearch, Px, Py, 511, 388, 511, 424, 0xBD302E, 30, fast RGB if errorlevel = 0 { sleep slowdelay gosub, red } } red: loop, 10 { mousegetpos, xpos2, ypos2 PixelSearch, Px, Py, 511, 388, 511, 424, 0xBD302E, 30, fast RGB if errorlevel = 0 track = 1 if errorlevel = 1 break if (a_index > 0) fade := (a_index / 100) move := (slowness + fade) if track = 1 { MouseGetPos, xpos1, ypos1 newx1 := (xpos1-xpos2) newx2 := (xpos2-xpos1) mousexy(newx2/move, 0) mousegetpos, xpos2, ypos2 track = 0 } } loop { sleep 1 PixelSearch, Px, Py, 511, 388, 511, 424, 0xBD302E, 30, fast RGB if errorlevel = 1 return } return Any help about the error is greatly appreciated and perhaps something else you may spot. Thanks in advance
  3. I switched almost all my scripts from autohotkey to autoit a year ago and I don't regret it I still have an active autohotkey script with all my autotext phrases p.e. #If (A_ComputerName = "PCNAME") :?*:\\me::myname@domain.com etc Is there a no way to switch them also to autoit?
×
×
  • Create New...