Jump to content

Merchants

Active Members
  • Posts

    196
  • Joined

  • Last visited

Everything posted by Merchants

  1. Question: Why does it fail? I got this error again on a other icon same problem If i try the add the high quality icon it fail and the lower quality works Got the icon from a game exe using resource hacker I have attach the 2 icon files so the dev can take a better look at it Icon1 = high quality Icon2 = next step down qualtiy Also addit source where i got the icon from Merchants Icon1.ico Icon2.ico
  2. Also worked for me
  3. Thanks it works
  4. why is this key not working HotKeySet("{OEM_109}", "Start") Gr Merchants
  5. I Fix it on my own: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $aPos = WinGetPos("[CLASS:Notepad]"), $test=0, $test2=0,$Text,$Text2, $count=0 $Form1 = GUICreate("NotePad Leech!", 300, $aPos[3] - 40, $aPos[0] + 5 + $aPos[2], $aPos[1] + 5) $Text = GUICtrlCreateLabel("WinActive Notepad: " & $test, 5, 5) $Text2 = GUICtrlCreateLabel("WinActive Notepad Leech!: " & $test2, 5, 25) Opt("WinTitleMatchMode","2") GUISetState(@SW_SHOW) GUIRegisterMsg($WM_TIMER, "_Interrupt") DllCall("User32.dll", "int", "SetTimer", "hwnd", $Form1, "int", 0, "int", 0, "int", 0) While 1 Sleep(1) $nMsg = GUIGetMsg() Switch $nMsg Exit Case $GUI_EVENT_CLOSE EndSwitch WEnd Func _Interrupt() Global $bPos = WinGetPos("NotePad Leech!") Global $aPos = WinGetPos("[CLASS:Notepad]") If $bPos[0] <> $aPos[0] + $aPos[2] Or $aPos[1] <> $bPos[1] And WinActive("[CLASS:Notepad]") Then WinMove("NotePad Leech!", "", $aPos[0] + 5 + $aPos[2], $aPos[1] + 5, 300, $aPos[3] - 10) EndIf If $bPos[0] <> $bPos[0] - $aPos[2] Or $bPos[1] <> $aPos[1] And WinActive("NotePad Leech!") Then WinMove("[CLASS:Notepad]", "", $bPos[0] - 5 - $aPos[2], $bPos[1] - 5, 300, $bPos[3] + 10) EndIf If WinActive("[CLASS:Notepad]") Then If $test=0 Then WinSetOnTop("NotePad Leech!", "", 1) WinSetOnTop("NotePad Leech!", "", 0) $test=1 EndIf Else $test=0 EndIf If WinActive("NotePad Leech!") Then If $test2=0 Then WinSetOnTop("[CLASS:Notepad]", "", 1) WinSetOnTop("[CLASS:Notepad]", "", 0) $test2=1 EndIf Else $test2=0 EndIf If $count = 10 Then $count=0 GUICtrlSetData($Text, "WinActive Notepad: " & $test) GUICtrlSetData($Text2, "WinActive Notepad Leech!: " & $test2) Else $count+=1 EndIf EndFunc Thx for everyone's suggestions
  6. I realy don't like the setontop func there is a correct way to do this ?
  7. Oké not bad it worked. I edit it a little better so it doesn't get hanged up when you drag de GUI nieuw problem when i drag the notepad it hide the gui and the other way around any way to fix that? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $aPos = WinGetPos("[CLASS:Notepad]") $Form1 = GUICreate("NotePad Leech!", 300, $aPos[3] - 40, $aPos[0] + 5 + $aPos[2], $aPos[1] + 5) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_TIMER, "_Interrupt") DllCall("User32.dll", "int", "SetTimer", "hwnd", $Form1, "int", 0, "int", 0, "int", 0) While 1 Sleep(1) $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _Interrupt() Global $bPos = WinGetPos("NotePad Leech!") Global $aPos = WinGetPos("[CLASS:Notepad]") If $bPos[0] <> $aPos[0] + $aPos[2] Or $aPos[1] <> $bPos[1] And WinActive("[CLASS:Notepad]") Then WinMove("NotePad Leech!", "", $aPos[0] + 5 + $aPos[2], $aPos[1] + 5, 300, $aPos[3] - 10) EndIf If $bPos[0] <> $bPos[0] - $aPos[2] Or $bPos[1] <> $aPos[1] And WinActive("NotePad Leech!") Then WinMove("[CLASS:Notepad]", "", $bPos[0] - 5 - $aPos[2], $bPos[1] - 5, 300, $bPos[3] + 10) EndIf EndFunc
  8. btw check post 1 again is it not possible with GUIRegisterMsg?
  9. how to stick a GUI to notepad so it comes along when i drag notepad And the other way around (When you drag the GUI the notepad comes along) Opt("MouseCoordMode", 2) #include <WindowsConstants.au3> $Win = WinGetHandle("notepad.exe") WinActivate($Win) Global $iGUI = GUICreate("test", 175, 160, 200, 200) GUICtrlCreateLabel("Some text", 5, 5) GUISetStyle($WS_CAPTION, $WS_BORDER) GUISetState(@SW_SHOW, $iGUI) GUIRegisterMsg($WM_MOVE, "_Position_Child") While 1 Sleep(1) WEnd Func _Position_Child() Local $aGUI_Main_Pos = WinGetPos($Win) WinMove($iGUI, "", $aGUI_Main_Pos[0], $aGUI_Main_Pos[1]) EndFunc
  10. the problem is fixed Thank you
  11. and that can be done with this? _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_ImageDispose($hImage)
  12. hi i have a img loadit in a GUI done it with: _GDIPlus_StartUp() GUIRegisterMsg($WM_PAINT, "MY_WM_PAINT") Load_Img("any Pic", $GUI[0]) Sleep(1500) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_ImageDispose($hImage) _WinAPI_RedrawWindow($GUI[0]) Sleep(10) DirRemove(@ScriptDir & "\Img_Folder\",1) Func Load_Img($pic, $hwin) $hImage = _GDIPlus_ImageLoadFromFile($pic) $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hwin) _WinAPI_RedrawWindow($hwin) EndFunc Func MY_WM_PAINT($hWnd, $Msg, $wParam, $lParam) _WinAPI_RedrawWindow($GUI[0], 0, 0, $RDW_UPDATENOW) _GDIPlus_GraphicsDrawImageRect($hGraphic, $hImage, 10, 75, 768, 576) ; Standaard Pal formaat _WinAPI_RedrawWindow($GUI[0], 0, 0, $RDW_VALIDATE) Return $GUI_RUNDEFMSG EndFuncbut the image is located in a folder if i want to delete the dir i said that the img file is in use by Autoit what can i do? Gr Merchants
  13. hi i got a text that i want to replace: input: C:\Users\Anyname\Desktop\HPIM7798.JPG StringRegExpReplace(input, "", "") I want as output: HPIM7798.JPG Gr Merchants
  14. learned something new today
  15. i have a input of 5/3 that gives me 1,666666666666667 this is a very lager number i want a output of 1,666 any possible way to convert that?
  16. i want to lock a button down when it is pressed more like a option select #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) $cButton1 = GUICtrlCreateButton("option 1", 10, 50, 80, 30) $cButton2 = GUICtrlCreateButton("option 2", 10, 100, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
  17. Found it my self: $number="100k" Msgbox(64,"input", "input: " & $number) If StringRegExp($number,"k") Then $R = StringReplace(StringReplace(StringReplace($number, ",","."), " ",""), "k","")*1000 ElseIf StringRegExp($number,"m") Then $R = StringReplace(StringReplace(StringReplace($number, ",","."), " ",""), "m","")*1000000 Else $R = StringReplace($number, ",",".") EndIf Msgbox(64,"output", "output: " & $R) ; -> From small to large numbers $number="100000" Msgbox(64,"input", "input: " & $number) If ($number > 9999 And $number < 999999) Then $R = $number/1000 & "k" ElseIf $number > 999999 Then $R = $number/1000000 & "m" Else $R = $number EndIf Msgbox(64,"output", "output: " & $R) ; -> From large to smaller numbers
  18. SetMinVisible oké thank you for you a thumb up
  19. i want to replace smaller numbers into large number and i can't do it with one string replace or i need to stack it up but that is not so economic so i need a better func for it ;input = test 2 StringReplace(StringReplace("test 2", "2","1"), " ","-") ;Output = test-1 when i create a input text i want to put it in a generator so that i get a output that i want some examples below: input = "5k" -> i want to see a output of: 5000 and some more examples: 5k -> 5000 1k -> 1000 2,2k -> 2200 1m -> 1000000 and i also like to convert it backwords 5000 -> 5k 1000 -> 1k 2200 -> 2,2k etc...
  20. ok then i wil use that quick question: the combo box can show 30 items when clicked down by default is there a way to increased that? i wana see 50 items without scrolling down for it
×
×
  • Create New...