Jump to content

AlexFing17

Active Members
  • Posts

    30
  • Joined

  • Last visited

Recent Profile Visitors

175 profile views

AlexFing17's Achievements

Seeker

Seeker (1/7)

1

Reputation

  1. Please what am i doing wrong here.\ I want my program to call a function with the process name i write in the script is the same as the name in process list. if is the same name then it gives a message , if not then it gives a message that it is not. I will compile it and save it as test.exe if the process name in the script should be the name running in process list then it tells me "the name matches" if not then it tells me "the name doesnt math" please any help? #include <MsgBoxConstants.au3> #include <Process.au3> Local $iPid = WinGetProcess("test.exe", "") Local $sName = _ProcessGetName($iPid) if $sName then MsgBox($MB_SYSTEMMODAL,"Box", "The name match the process name" ) Else MsgBox($MB_SYSTEMMODAL,"Box", "The name doesnt match the process name" ) endif
  2. i have already Compile my main tool into an exe file. my question is. Can the main program "main.exe " create another exe file "main2.exe", and run it . the main2.exe also has it own functions to execute. .. i will run it on my laptop which doesnt have autoIt installed on it. 1. the main program is main.exe which creates a folder and create a txt file and name it with the current date 2. It then creates another .exe file called main2.exe and then runs it. 3. after it runs the main2.exe file then the main.exe closes itself from process. 4. now the main2.exe is the main program now, which will wait for new usb drives then copied the created text to it. is it possible?
  3. Hello all, what i actually mean is , can a compiled script have scripts that can create a new exe file . main program is "prog.exe" which has functions of doing specific task, is there a code or possible to make "prog.exe" create another program called "prog2.exe" and then runs it. which "prog2.exe" also has it own functions to execute. Will be glad to find some help, Thanks forum
  4. Thanks very much.from your code, i have been able to edit it to my like. Thank you
  5. Hello , I want to know if its possible to bind exe file to autoIt script into one file (result.exe)? file1 is an autoIt program with scripts compiled into exe ( main program) file2 is another exe file not programmed with autoit. "Duc.exe" (should be open when the main program is runned. is it possible to do this. so that when the final file is run. the duc runs. and the autoit program still working depending on how i coded it.
  6. got the script from this forum but am trying to make changes. The file i want to be copied is the monday.txt . how i make the script copy the file to any detected removable drive                 FileCopy(@DesktopDir & "\todolist\Monday.txt", "REMOVABLE")
  7. Thanks for the help from this forum, I have been able to create a script to detect new removable drives when inserted. But my problem is how it can copy a file to the detected drive. here is the code. Please what am i doing wrong here $DBT_DEVICEARRIVAL = "0x00008000" $WM_DEVICECHANGE = 0x0219 GUICreate("") GUIRegisterMsg($WM_DEVICECHANGE , "MyFunc") Func MyFunc($hWndGUI, $MsgID, $WParam, $LParam) If $WParam == $DBT_DEVICEARRIVAL Then $dg = DriveGetDrive( "REMOVABLE" ) For $i = 1 to $dg[0] $dt = DriveGetType( $dg[$i] ) If $dt = "REMOVABLE" And $dg[$i] <> "a:" And $dg[$i] <> "b:" Then ;;look for my marker file at $dg[$i] , if found do check... FileCopy(@DesktopDir & "\todolist\Monday.txt", "REMOVABLE") EndIf Next EndIf EndFunc While 1 $GuiMsg = GUIGetMsg() WEnd
  8. hello, from help from this forum i have been able to create many programs, with credits to everyone who help. I am creating another app. But stucked. My app has a client and server which, the client connects the server and opens a chat box. PROBLEM. It connects to the server if ip and port are input in a pop-up box, before it connects. WHAT I NEED> instead of the pop up input box. I want the box to be in the gui. Whereby if i enter the ip and port and then click on connect, then i will connect. Below is pic of the pop-up and how i want it to be link in the gui.. And also the code is below #include <GUICONSTANTS.AU3> #include <WINDOWSCONSTANTS.AU3> #include <STATICCONSTANTS.AU3> #include <EDITCONSTANTS.AU3> #include <MISC.AU3> #Include <GuiEdit.au3> #Include <WinAPI.au3> #Include <DATE.au3> ; =============================================================================================================================== ; Global constants ; ========================================================================================================================== Opt ('GUIoneventmode', 1) $GUIStyle = BitOR($WS_DLGFRAME,$WS_POPUP, $WS_VISIBLE) $GUIStyleEx = BitOR ($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE) $EditStyle = BitOR($ES_MULTILINE,$WS_VSCROLL) $EditStyleEx = BitOR($EditStyle, $ES_READONLY) $W = 0xFFFFFF $B = 0x0 $Titleb = 0x7F7F7F TCPStartup() $0 = 0 $00 = 0 $000 = 0 $ip = InputBox ('IP=?','Please choose a funtioning IP for your server...',@IPAddress1) ;Makes the servers IP address... default is your @IPADDRESS1. $port = InputBox ('Port=?','Please Choose a port # that is not being used...',Random (100, 10000,1)) ;Makes the port # can be anything between 1 and 60000. ;(the maximum is a guess i don't know how many ports there are butits close). ;and ONLY if the port is not already being used. ;MUST BE SERVER OPENED PORT NOT ONE ON YOUR COMPUTER!!! For $0 = 0 To 10 $Socket = TCPConnect($ip, $port) ;Connects to an open socket on the server... If $Socket <> -1 Then ExitLoop TCPCloseSocket($Socket) Sleep(300) Next If $Socket = -1 Then _Exit () TCPSend ($Socket, @UserName & '^EXAMPLE DATA') Local $GUI = GUICreate("FarC0nn3c7", 500, 400, -1, -1, $WS_SIZEBOX) Local $idHelpMenu = GUICtrlCreateMenu("Knowing you are better than what people say about you is a key to success--JIBRIL STURNA-----") GUICtrlCreateLabel("Server:", 2, 14, 52, 20, $SS_RIGHT) $ip = GUICtrlCreateEdit("127.0.0.1", 56, 10, 200, 20, $SS_LEFT) GUICtrlCreateLabel("Port:", 270, 14, 52, 20, $SS_Left) $port = GUICtrlCreateEdit("1000", 296, 10, 194, 20, $SS_LEFT) $g_idSend = GUICtrlCreateButton("Connect", 230, 32, 60, 20) GUISetBkColor(0x99CC00) $Console = GUICtrlCreateEdit ('',0,70,350,200,$EditStyleEx) $Send = GUICtrlCreateEdit ('Hello server',0,280,350,70,$EditStyle) GUICtrlSetLimit (-1, 250) GUISetOnEvent ($GUI_EVENT_CLOSE, '_Exit', $GUI) GUISetState () HotKeySet('{ENTER}', '_Send') While 1 _Recv_From_Server () Sleep(100) WEnd Func _Send () $0 = GUICtrlRead ($Send) If $0 = '' Then Return TCPSend($Socket, $0) GUICtrlSetData ($Send,'') EndFunc ;==>_send_ Func _Recv_From_Server () $Recv = TCPRecv($Socket, 1000000) If $Recv = '' Then Return _GUICtrlEdit_AppendText ($Console,_NowTime () & ' -- ' & $Recv & @CRLF) EndFunc ;==>_Recv_From_Server_ Func _Minn () WinSetState ($GUI, '', @SW_MINIMIZE) EndFunc Func _Exit () TCPCloseSocket ($Socket) TCPShutdown() Exit EndFunc ;==>_Exit_
  9. I want the server to receive connection from only my no ip adrees.. in a the case where 1. if the server is running then it waits for remote connection from my no ip address. 2. so i set the no ip address on my computer and runs the client , the server on my home computer will connect back to it automatic if is online.
  10. Thanks Guys. I made corrections with the help from both codes. and everything works as expected. Thank you once again
  11. Thanks Very it worked. thanks you have been of help
  12. Hello, i am creating a program that 1. it will check if the computer is connected to the internet 2. will display a message if it is connected 3.if not connected then it will continue to check until the computer connects to the internet then it runs the function which would have been executed if the computer was connected to the internet. what i tried. i connected my computer to the internet and run the code. Which displayed the msgbox that am connected i later turn my internet off and run the cold , i saw it running in process list.. i waited for 5 minutes and it was still waiting for internet connection (running), but when i turned the internet on and got internet connectivity, the app just close without displaying the msg that am connected. Please need help where i went wrong. or if anything should be added. this is the code #AutoIt3Wrapper_icon=1.ico $ping = Ping("www.google.com") If Not @error Then MsgBox("", "AlexFing", "You are connect") Else Do $ping = Ping("www.google.com") Until Not @error EndIf
×
×
  • Create New...