Jump to content
Sign in to follow this  
careca

_Ispressed...code Error Or Bug?

Recommended Posts

careca

Hi folks, problem is that this is only supposed to respond to Control key press, and it does, but also responds when i press R-ALT! Try it out...

#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=Paper.ico
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Res_Icon_Add=Paper.ico
#AutoIt3Wrapper_Run_Tidy=y
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <Misc.au3>
#include <Constants.au3>
#include "image_get_info.au3"
Opt("TrayOnEventMode", 1)
Opt("TrayAutoPause", 0)
Opt("TrayMenuMode", 0)
Opt("TrayIconDebug", 1)
TraySetClick(16)
TraySetToolTip("Paster")
TraySetIcon('Paper.ico')
FileInstall("Paper.ico", "Paper.ico")
FileInstall("image_get_info.au3", "image_get_info.au3")
$dll = DllOpen("user32.dll")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run", "Paster", "REG_SZ", "C:\Windows\Paster.exe")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "EnableBalloonTips", "REG_DWORD", "1")
Global $key1, $key2, $key3, $key4, $key5, $keyctrl, $keylmb, $WS

;P = 50
;M = 4D
;B = 42
;3 = 33
;7 = 37
;9 = 39
;ALT = 12
;CTRL = 11

$WS = TrayCreateItem("Remove from windows start")
TrayItemSetOnEvent($WS, "wstart")

Func wstart()
    TrayItemSetState($WS, $TRAY_UNCHECKED)
    RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run", "Paster")
EndFunc   ;==>wstart

While 1
    Sleep(50)
    If _IsPressed("11", $dll) Then ;CTRL
        $keyctrl = 1
        ToolTip('CTRL')
        CTRLkey()
    ElseIf $keyctrl + $key1 = 2 Then
        Gmail()
    ElseIf $keyctrl + $key2 = 2 Then
        CGD()
    ElseIf $keyctrl + $key3 = 2 Then
        PW3()
    ElseIf $keyctrl + $key4 = 2 Then
        PW7()
    ElseIf $keyctrl + $key5 = 2 Then
        PW9()
    ElseIf $keyctrl + $keylmb = 2 Then
        RES()
    EndIf
WEnd
DllClose($dll)

Func CTRLkey()
    If _IsPressed("01", $dll) Then ;LMB
        $keylmb = 1
    ElseIf _IsPressed("4D", $dll) Then ;M
        $key1 = 1
    ElseIf _IsPressed("42", $dll) Then ;B
        $key2 = 1
    ElseIf _IsPressed("33", $dll) Then ;3
        $key3 = 1
    ElseIf _IsPressed("37", $dll) Then ;7
        $key4 = 1
    ElseIf _IsPressed("39", $dll) Then ;9
        $key5 = 1
    EndIf
    Sleep(100)
    ToolTip('')
EndFunc   ;==>CTRLkey

Func Gmail()
    Send("@gmail.com")
    $keyctrl = 0
    $key1 = 0
EndFunc   ;==>Gmail

Func CGD()
    Send("123")
    $keyctrl = 0
    $key2 = 0
EndFunc   ;==>CGD

Func PW3()
    Send("123")
    $keyctrl = 0
    $key3 = 0
EndFunc   ;==>PW3

Func PW7()
    Send("123")
    $keyctrl = 0
    $key4 = 0
EndFunc   ;==>PW7

Func PW9()
    Send("123")
    $keyctrl = 0
    $key5 = 0
EndFunc   ;==>PW9

Func RES()
    $keyctrl = 0
    $keylmb = 0
    Send("^c")
    Sleep(50)
    $file = ClipGet()
    $aInfo = _ImageGetInfo($file)
    TrayTip("Resolution", _ImageGetParam($aInfo, "Width") & "x" & _ImageGetParam($aInfo, "Height"), 2, 1)
EndFunc   ;==>RES

Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
guinness

What is wrong with HotKeySet? Also what does the application do exactly?

Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Share this post


Link to post
Share on other sites
careca

Nothing wrong with hotkeyset really, just that it messes everything up, it's like the ctrl key stays pressed, it just acts weird, doesn't paste the text properlly...

The only objective of this is to paste text, stuff i commonly write..

And it retrieves the resolution of images i control+left click on, in a traytip.

Does it work when you press Right ALT on your machine? i mean RALT + B/3/7/9..

Edited by careca

Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
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
Sign in to follow this  

×