Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[Problem]Otworzenie programu tylko jezeli dany proces jest włączony.


Rekomendowane odpowiedzi

Opublikowano

Siemka, mógł by mi ktoś przerobić kod tak aby program otwierał się tylko jak proces "tibia.exe" chodzi, a jak takowy proces nie chodzi żeby wyskakiwał komunikat ;)

 

kod:

 

 
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <nomad.au3>
#include <Timers.au3>
$l = _Timer_Init()
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("BOMBU VOL.1", 190, 311, 192, 124)
$Button1 = GUICtrlCreateButton("Spell'er", 8, 8, 75, 25, $WS_GROUP)
$Input1 = GUICtrlCreateInput("Utevo lux", 16, 40, 121, 21)
$Input2 = GUICtrlCreateInput("30", 16, 64, 121, 21)
$Button2 = GUICtrlCreateButton("AFK move'er", 8, 96, 75, 25, $WS_GROUP)
$Input3 = GUICtrlCreateInput("5", 16, 128, 121, 21)
$Button3 = GUICtrlCreateButton("Food'er", 8, 160, 75, 25, $WS_GROUP)
$Input4 = GUICtrlCreateInput("{F9}", 16, 192, 121, 21)
$Input5 = GUICtrlCreateInput("45", 16, 216, 121, 21)
$Button4 = GUICtrlCreateButton("Wylacz", 88, 8, 75, 25, $WS_GROUP)
$Button5 = GUICtrlCreateButton("Wylacz", 88, 96, 75, 25, $WS_GROUP)
$Button6 = GUICtrlCreateButton("Wylacz", 88, 160, 75, 25, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("0", 150, 248, 36, 17)
$Label2 = GUICtrlCreateLabel("Bot chodzi", 16, 248)
$Label3 = GUICtrlCreateLabel("godzina", 16, 280)
$Label4 = GUICtrlCreateLabel("0", 112, 280, 46, 17)
GUISetState(@SW_SHOW)
_Timer_SetTimer($form1,1,"czasod")
func czasod($1,$2,$3,$4)
    $z = _Timer_Diff($l)
    $z /= 1000
    $z = int($z)
    guictrlsetdata($Label1,$z & " sec")
EndFunc
_Timer_SetTimer($form1,1,"godzina")
func godzina($1,$2,$3,$4)
    $pzpjo = Stringformat("%02d:%02d:%02d", @hour, @min, @sec)
    $pzp = guictrlread($label4)
    if $pzp = $pzpjo Then
 
    Else
        guictrlsetdata($label4,Stringformat("%02d:%02d:%02d", @hour, @min, @sec))
    EndIf
    EndFunc
#EndRegion ### END Koda GUI section ###
guictrlsetstate($Button4,$gui_disable)
guictrlsetstate($Button5,$gui_disable)
guictrlsetstate($Button6,$gui_disable)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        case $Button1
            guictrlsetstate($Button1,$gui_disable)
            guictrlsetstate($Button4,$gui_enable)
            global $pid = ProcessExists("Tibia.exe")
            $memaaa = _MemoryOpen($pid)
            $id1 = _Timer_SetTimer($form1,500,"spell")
        case $Button2
            guictrlsetstate($Button2,10000000)
            guictrlsetstate($Button5,64)
            $ff = guictrlread($input3)
            $ff *= 1000
            $id2 = _Timer_SetTimer($form1,$ff,"afk")
        case $Button3
            guictrlsetstate($button3,128)
            guictrlsetstate($button6,64)
            $ks = guictrlread($Input4)
            $ksks = guictrlread($Input5)
            $id3 = _Timer_SetTimer($form1,$ksks,"food")
        case $Button4
            _Timer_KillTimer($form1,$id1)
            guictrlsetstate($Button4,123)
            guictrlsetstate($Button1,64)
        case $Button5
_Timer_KillTimer($form1,$id2)
guictrlsetstate($button5,128)
guictrlsetstate($button2,64)
        case $Button6
            _Timer_KillTimer($form1,$id3)
            guictrlsetstate($button6,128)
            guictrlsetstate($button3,64)
    EndSwitch
WEnd
func food($1,$2,$3,$4)
    $ksks *= 1000
    controlsend("Tibia","","",$ks)
    EndFunc
func afk($1,$2,$3,$4)
    controlsend("Tibia","","","{ctrldown}{down}{ctrlup}")
    controlsend("Tibia","","","{ctrldown}{up}{ctrlup}")
    controlsend("Tibia","","","{ctrldown}{left}{ctrlup}")
    controlsend("Tibia","","","{ctrldown}{right}{ctrlup}")
    EndFunc
 
func spell($1,$2,$3,$4)
    $kk = guictrlread($input2)
    $mem = _MemoryRead(0x0063FE78,$memaaa)
    if $mem >= $kk Then
        controlsend("Tibia","","",guictrlread($input1))
        controlsend("Tibia","","","{enter}")
    EndIf
 EndFunc
 
Opublikowano

If ProcessExists("Tibia.exe") Then

// Instrukcje

Else If Not ProcessExists("Tibia.exe") Then

MsgBox

EndIF

 

Albo

 

If ProcessExists("Tibia.exe") Then

// Instrukcje

Else

MsgBox

EndIF

OndteAw.png
Opublikowano

Przetestuje

 

 

//co zle zrobilem?

 

 
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <nomad.au3>
#include <Timers.au3>
$l = _Timer_Init()
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("BOMBU VOL.1", 190, 311, 192, 124)
$Button1 = GUICtrlCreateButton("Spell'er", 8, 8, 75, 25, $WS_GROUP)
$Input1 = GUICtrlCreateInput("Utevo lux", 16, 40, 121, 21)
$Input2 = GUICtrlCreateInput("30", 16, 64, 121, 21)
$Button2 = GUICtrlCreateButton("AFK move'er", 8, 96, 75, 25, $WS_GROUP)
$Input3 = GUICtrlCreateInput("5", 16, 128, 121, 21)
$Button3 = GUICtrlCreateButton("Food'er", 8, 160, 75, 25, $WS_GROUP)
$Input4 = GUICtrlCreateInput("{F9}", 16, 192, 121, 21)
$Input5 = GUICtrlCreateInput("45", 16, 216, 121, 21)
$Button4 = GUICtrlCreateButton("Wylacz", 88, 8, 75, 25, $WS_GROUP)
$Button5 = GUICtrlCreateButton("Wylacz", 88, 96, 75, 25, $WS_GROUP)
$Button6 = GUICtrlCreateButton("Wylacz", 88, 160, 75, 25, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("0", 150, 248, 36, 17)
$Label2 = GUICtrlCreateLabel("Bot chodzi", 16, 248)
$Label3 = GUICtrlCreateLabel("godzina", 16, 280)
$Label4 = GUICtrlCreateLabel("0", 112, 280, 46, 17)
GUISetState(@SW_SHOW)
_Timer_SetTimer($form1,1,"czasod")
func czasod($1,$2,$3,$4)
    $z = _Timer_Diff($l)
    $z /= 1000
    $z = int($z)
    guictrlsetdata($Label1,$z & " sec")
EndFunc
_Timer_SetTimer($form1,1,"godzina")
func godzina($1,$2,$3,$4)
    $pzpjo = Stringformat("%02d:%02d:%02d", @hour, @min, @sec)
    $pzp = guictrlread($label4)
    if $pzp = $pzpjo Then
 
    Else
        guictrlsetdata($label4,Stringformat("%02d:%02d:%02d", @hour, @min, @sec))
    EndIf
    EndFunc
#EndRegion ### END Koda GUI section ###
guictrlsetstate($Button4,$gui_disable)
guictrlsetstate($Button5,$gui_disable)
guictrlsetstate($Button6,$gui_disable)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        case $Button1
            guictrlsetstate($Button1,$gui_disable)
            guictrlsetstate($Button4,$gui_enable)
            global $pid = ProcessExists("Tibia.exe")
            $memaaa = _MemoryOpen($pid)
            $id1 = _Timer_SetTimer($form1,500,"spell")
        case $Button2
            guictrlsetstate($Button2,10000000)
            guictrlsetstate($Button5,64)
            $ff = guictrlread($input3)
            $ff *= 1000
            $id2 = _Timer_SetTimer($form1,$ff,"afk")
        case $Button3
            guictrlsetstate($button3,128)
            guictrlsetstate($button6,64)
            $ks = guictrlread($Input4)
            $ksks = guictrlread($Input5)
            $id3 = _Timer_SetTimer($form1,$ksks,"food")
        case $Button4
            _Timer_KillTimer($form1,$id1)
            guictrlsetstate($Button4,123)
            guictrlsetstate($Button1,64)
        case $Button5
_Timer_KillTimer($form1,$id2)
guictrlsetstate($button5,128)
guictrlsetstate($button2,64)
        case $Button6
            _Timer_KillTimer($form1,$id3)
            guictrlsetstate($button6,128)
            guictrlsetstate($button3,64)
    EndSwitch
WEnd
func food($1,$2,$3,$4)
    $ksks *= 1000
    controlsend("Tibia","","",$ks)
    EndFunc
func afk($1,$2,$3,$4)
    controlsend("Tibia","","","{ctrldown}{down}{ctrlup}")
    controlsend("Tibia","","","{ctrldown}{up}{ctrlup}")
    controlsend("Tibia","","","{ctrldown}{left}{ctrlup}")
    controlsend("Tibia","","","{ctrldown}{right}{ctrlup}")
    EndFunc
 
func spell($1,$2,$3,$4)
    $kk = guictrlread($input2)
    $mem = _MemoryRead(0x0063FE78,$memaaa)
    if $mem >= $kk Then
        controlsend("Tibia","","",guictrlread($input1))
        controlsend("Tibia","","","{enter}")
        If ProcessExists("Tibia.exe") Then
           MsgBox(4096, "Błąd", "Nie odnaleziono procesu tibia.exe!", 10)
    EndIf
 EndFunc
Opublikowano

 

 


#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <nomad.au3>
#include <Timers.au3>
$l = _Timer_Init()
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("BOMBU VOL.1", 190, 311, 192, 124)
$Button1 = GUICtrlCreateButton("Spell'er", 8, 8, 75, 25, $WS_GROUP)
$Input1 = GUICtrlCreateInput("Utevo lux", 16, 40, 121, 21)
$Input2 = GUICtrlCreateInput("30", 16, 64, 121, 21)
$Button2 = GUICtrlCreateButton("AFK move'er", 8, 96, 75, 25, $WS_GROUP)
$Input3 = GUICtrlCreateInput("5", 16, 128, 121, 21)
$Button3 = GUICtrlCreateButton("Food'er", 8, 160, 75, 25, $WS_GROUP)
$Input4 = GUICtrlCreateInput("{F9}", 16, 192, 121, 21)
$Input5 = GUICtrlCreateInput("45", 16, 216, 121, 21)
$Button4 = GUICtrlCreateButton("Wylacz", 88, 8, 75, 25, $WS_GROUP)
$Button5 = GUICtrlCreateButton("Wylacz", 88, 96, 75, 25, $WS_GROUP)
$Button6 = GUICtrlCreateButton("Wylacz", 88, 160, 75, 25, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("0", 150, 248, 36, 17)
$Label2 = GUICtrlCreateLabel("Bot chodzi", 16, 248)
$Label3 = GUICtrlCreateLabel("godzina", 16, 280)
$Label4 = GUICtrlCreateLabel("0", 112, 280, 46, 17)
GUISetState(@SW_SHOW)
_Timer_SetTimer($form1,1,"czasod")
func czasod($1,$2,$3,$4)
    $z = _Timer_Diff($l)
    $z /= 1000
    $z = int($z)
    guictrlsetdata($Label1,$z & " sec")
EndFunc
_Timer_SetTimer($form1,1,"godzina")
func godzina($1,$2,$3,$4)
    $pzpjo = Stringformat("%02d:%02d:%02d", @hour, @min, @sec)
    $pzp = guictrlread($label4)
    if $pzp = $pzpjo Then

    Else
        guictrlsetdata($label4,Stringformat("%02d:%02d:%02d", @hour, @min, @sec))
    EndIf
    EndFunc
#EndRegion ### END Koda GUI section ###
guictrlsetstate($Button4,$gui_disable)
guictrlsetstate($Button5,$gui_disable)
guictrlsetstate($Button6,$gui_disable)
Global $PID = ProcessExists("tibia.exe")
If Not $PID Then
	MsgBox(0,"error","nie wyryto tibi!")
	Sleep(1000)
	Exit
EndIf
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        case $Button1
            guictrlsetstate($Button1,$gui_disable)
            guictrlsetstate($Button4,$gui_enable)
            global $pid = ProcessExists("Tibia.exe")
            $memaaa = _MemoryOpen($pid)
            $id1 = _Timer_SetTimer($form1,500,"spell")
        case $Button2
            guictrlsetstate($Button2,10000000)
            guictrlsetstate($Button5,64)
            $ff = guictrlread($input3)
            $ff *= 1000
            $id2 = _Timer_SetTimer($form1,$ff,"afk")
        case $Button3
            guictrlsetstate($button3,128)
            guictrlsetstate($button6,64)
            $ks = guictrlread($Input4)
            $ksks = guictrlread($Input5)
            $id3 = _Timer_SetTimer($form1,$ksks,"food")
        case $Button4
            _Timer_KillTimer($form1,$id1)
            guictrlsetstate($Button4,123)
            guictrlsetstate($Button1,64)
        case $Button5
_Timer_KillTimer($form1,$id2)
guictrlsetstate($button5,128)
guictrlsetstate($button2,64)
        case $Button6
            _Timer_KillTimer($form1,$id3)
            guictrlsetstate($button6,128)
            guictrlsetstate($button3,64)
    EndSwitch
WEnd
func food($1,$2,$3,$4)
    $ksks *= 1000
    controlsend("Tibia","","",$ks)
    EndFunc
func afk($1,$2,$3,$4)
    controlsend("Tibia","","","{ctrldown}{down}{ctrlup}")
    controlsend("Tibia","","","{ctrldown}{up}{ctrlup}")
    controlsend("Tibia","","","{ctrldown}{left}{ctrlup}")
    controlsend("Tibia","","","{ctrldown}{right}{ctrlup}")
    EndFunc

func spell($1,$2,$3,$4)
    $kk = guictrlread($input2)
    $mem = _MemoryRead(0x0063FE78,$memaaa)
    if $mem >= $kk Then
        controlsend("Tibia","","",guictrlread($input1))
        controlsend("Tibia","","","{enter}")
    EndIf
 EndFunc

 

 

 

 

wystarczyło wstawić to :

 

Global $PID = ProcessExists("tibia.exe")
If Not $PID Then
	MsgBox(0,"error","nie wyryto tibi!")
	Sleep(1000)
	Exit

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...