However, when I paste the file, I would like the tooltip to disappear. I cannot get this to work using GetKeyState for Control and v??? See Orange
:*:uuii:: path_2 := "C:\Users\BD\Desktop\tester.xlsx" if InvokeVerb(path_2, "Copy") { ToolTip, Saved to Clipboard Process,Exist hwnd:=WinExist("ahk_class tooltips_class32 ahk_pid " Errorlevel) Loop ToolTip_UpdatePos(hwnd) } ;---------- Notifies when pasted --------------- Loop, { GetKeyState, state1, Control GetKeyState, state2, v if(state1 = "D" and state2 = "D") { [color=#FF4000];**********I would like to remove the tool tip here ************* ;*********** I can't get the keystate when the tooltip is showing???? *****[/color] MsgBox You pasted it break } } return ;----------- Tooltip function ------------- ToolTip_UpdatePos(hwnd,x="",y=""){ static TTM_TRACKPOSITION := 0x412 VarSetCapacity(xc, 20, 0), xc := Chr(20),DllCall("GetCursorInfo", "Uint", &xc) ,yc := NumGet(xc,16), xc := NumGet(xc,12),xc+=10,yc+=10 If x xc:=x If y yc:=y DllCall("SendMessage", A_PtrSize ? "UPTR" : "UInt", hwnd , "Uint", TTM_TRACKPOSITION , A_PtrSize ? "UPTR" : "UInt", 0 , A_PtrSize ? "UPTR" : "UInt", (xc & 0xFFFF)|(yc & 0xFFFF)<<16) } ;----------- Copy file function ------------ InvokeVerb(path, menu, validate=True) { ;by A_Samurai ;v 1.0.1 http://sites.google.com/site/ahkref/custom-functions/invokeverb objShell := ComObjCreate("Shell.Application") if InStr(FileExist(path), "D") || InStr(path, "::{") { objFolder := objShell.NameSpace(path) objFolderItem := objFolder.Self } else { SplitPath, path, name, dir objFolder := objShell.NameSpace(dir) objFolderItem := objFolder.ParseName(name) } if validate { colVerbs := objFolderItem.Verbs loop % colVerbs.Count { verb := colVerbs.Item(A_Index - 1) retMenu := verb.name StringReplace, retMenu, retMenu, & if (retMenu = menu) { verb.DoIt Return True } } Return False } else objFolderItem.InvokeVerbEx(Menu) }