Jump to content

CoderDunn

Active Members
  • Posts

    336
  • Joined

  • Last visited

Everything posted by CoderDunn

  1. Cool. Now you have made my problem even easier! Thanks, this is alot better than the way I was doing it You should make some UDF's for this! Hallman
  2. Man thats perfect. Thank you SO much! Hallman
  3. A modified version of the client from the AutoIt3 help file using the IP and port u gave: ; Start The TCP Services ;============================================== TCPStartUp() ; Set Some reusable info ;-------------------------- Dim $szIPADDRESS = "123.43.234.25" Dim $nPORT = 2053 ; Initialize a variable to represent a connection ;============================================== Dim $ConnectedSocket = -1 ;Attempt to connect to SERVER at its IP and PORT 33891 ;======================================================= $ConnectedSocket = TCPConnect($szIPADDRESS,$nPORT) Dim $szData ; If there is an error... show it If @error Then MsgBox(4112,"Error","Unable to connect to the server") ; If there is no error loop an inputbox for data ; to send to the SERVER. Else ;Loop forever asking for data to send to the SERVER While 1 ; InputBox for data to transmit $szData = InputBox("Data for Server",@LF & @LF & "Enter data to transmit to the SERVER:") ; If they cancel the InputBox or leave it blank we exit our forever loop If @error Or $szData = "" Then ExitLoop ; We should have data in $szData... lets attempt to send it through our connected socket. TCPSend($ConnectedSocket,$szData) ; If the send failed with @error then the socket has disconnected ;---------------------------------------------------------------- If @error Then ExitLoop WEnd EndIf TCPCloseSocket($ConnectedSocket) The port is needed. What do you mean "find" the server your on? If your trying to find the IP address of for example a online game, use your fire wall. If it's a good fire wall, it should list all the connections to your computer. If not, you can download a packet sniffer. Hallman
  4. I have several hundred pictures from different students of a trip we took to california. Unfortunately, There are many different sizes. I need to downsize all the pictures to similar sizes. Instead of opening each one in paint to resize it, I would like to have an AutoIt script do this automatically (And not with a bunch of mouse clicks in a paint window, thats ugly and I'm planning on giving this tool to the students so they can resize them before giving them to me). I want it to silently edit all the pictures then output them in a seperate folder. After looking at PaulIA's Auto3Lib it looks like it may be possible with that. Help is much apreciated, Hallman
  5. sometimes Most likely you can't "run" services.msc. Just like you cant run a bitmap. You must run Paint with command line parameters to the bitmap. Try "MMC.exe" hmm it works fine for me. And about the cmd prompt ... you must not have wrote the expression correctly. Here is a re-write of your functions. Func cmd() If MsgBox(1, "CMD Prompt", "Your CPU will open CMD Prompt when you press OK.") = 1 Then Run("cmd") EndFunc ;==>cmd Func notepad() If MsgBox(1, "Notepad", "Your CPU will open notepad when you press OK.") = 1 Then Run("notepad") EndFunc ;==>notepad Func poweroff() If MsgBox(1, "Shutdown", "Your CPU will power off when you press OK.") = 1 Then Shutdown(9) EndFunc ;==>poweroff Func reboot() If MsgBox(1, "Reboot", "Your CPU will reboot when you press OK.") = 1 Then Shutdown(3) EndFunc ;==>reboot Func logoff() If MsgBox(1, "Log Off", "Your CPU will log off when you press OK.") = 1 Then Shutdown(0) EndFunc ;==>logoff Happy to help Hallman Note: Instead of posting 4 times in a row ... just edit your post
  6. Just becuase this script isn't usefull to you doesn't mean it isn't usefull to him. Don't forget that everyone starts somewhere ... you can't tell me you made really usefull apps right when you first started. Instead of knocking his script, praise what he has and help him to improve Telling him to make something more usefull but not giving any help on how to accomplish that doesn't do much good. Hallman
  7. Well a good habbit to get into is your formatting. The below code does exactly the same thing, but is easier to read. Make sure you use SciTE as your script editor ... it makes life MUCH easier The addon for SciTE called tidy can make your script look like the one below. I modified your GUI loop a bit to the more standard way autoit scripters typically do it ... with a select statement #include <GUIConstants.au3> GUICreate("CPU-Mach V0.2 - Made by Aces", 300, 400) $pic = GUICtrlCreatePic(@ScriptDir & "\space.jpg", 150, 10, 130, 300) $runmenu = GUICtrlCreateMenu("&Run") $runitem = GUICtrlCreateMenuItem("Run...", $runmenu) $shutdown = GUICtrlCreateButton("Power Off", 10, 10, 130, 50) $reboot = GUICtrlCreateButton("Reboot", 10, 70, 130, 50) $logoff = GUICtrlCreateButton("Log Off", 10, 130, 130, 50) $notepad = GUICtrlCreateButton("Notepad", 10, 190, 130, 50) $cmd = GUICtrlCreateButton("CMD Prompt", 10, 250, 130, 50) $ad1 = GUICtrlCreateLabel("CPU-Mach V0.2 - " & "Created by: Kevin Aces Morris @ [email protected]", 5, 350, 300, 50) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $shutdown poweroff() Case $msg = $reboot reboot() Case $msg = $logoff logoff() Case $msg = $notepad notepad() Case $msg = $cmd cmd() Case $msg = $runitem runmenu() EndSelect WEnd Func runmenu() $input = InputBox("Run...", "Please type the path you would like to run.") If $input <> "" Then Run($input) EndFunc ;==>runmenu Func cmd() MsgBox(0, "CMD Prompt", "Your CPU will open CMD Prompt when you press OK.") Run("cmd") EndFunc ;==>cmd Func notepad() MsgBox(0, "Notepad", "Your CPU will open notepad when you press OK.") Run("notepad") EndFunc ;==>notepad Func poweroff() MsgBox(0, "Shutdown", "Your CPU will power off when you press OK.") Shutdown(9) EndFunc ;==>poweroff Func reboot() MsgBox(0, "Reboot", "Your CPU will reboot when you press OK.") Shutdown(3) EndFunc ;==>reboot Func logoff() MsgBox(0, "Log Off", "Your CPU will log off when you press OK.") Shutdown(0) EndFunc ;==>logoffoÝ÷ Øìµæ¡øZ¾)àjg¬±¨ng¢ØÊØ^ºÇ«¶­Ýý² "Ú!j^r`÷­ér§qëhq©ÜzXî²Ø§q«¶²+mì+¢xºÛh·­²Æ²ÊÛaÇè®Ø^®éç¢×©i×îËb¢r-Â¥vZ(X¤zØb±«­¢+Ø)%5Í ½à İÅÕ½Ðí9½ÑÁÅÕ½Ðì°ÅÕ½Ðíe½ÕÈ ATÝ¥±°½Á¸¹½ÑÁÝ¡¸å½ÔÁÉÍÌ=,¸ÅÕ½Ðì¤ôÄQ¡¸IÕ¸ ÅÕ½Ðí¹½ÑÁÅÕ½Ðì¤( Now if the user clicks cancel, well, it cancels running notpad. You could do the same with the other ones two. Just remember to put a 1 for the first parameter of the MsgBox() function. It looks like your getting the hang of things just fine. Good luck scripting! Hallman
  8. I have no knowlege on this subject so I imagine it's a no. All I know is that i'm trying to run a server script on my personal computer. I have done nothing exept write the script and run it. I have changed no settings, and I'm not running anything else. How do I set up my PC to be a server? I apologise for my ignorance. Hallman
  9. um ... sorry but how do you do that? I cant get any computers to connect. My computer is not on a LAN but my friends is and the client/server works fine between his computers but again nothing outside of his LAN is able to connect.
  10. have a look at http://www.autoitscript.com/forum/index.ph...hl=CompInfo.au3 more specifically the _ComputerGetProcesses function. Hallman
  11. Yes with this it would be MUCH easier to make a game such as pacman where the ghosts try to get pacman. Maybe a free placement tower defense? BTW I rated this 5 stars
  12. Well, it checks everytime it trys to connect plus every few hours. I just want to know if my IP needs to be static for the tcp/ip functions to work correctly ... Also, is there a way to keep your ip from changing (or at least not as often) without paying the extra $$$?
  13. I have made a small server and client script so students in my orchestra can send our teacher their practice slips online. It works great on LAN but I want students to be able to connect from thier home. Does the computer running the server script require a static IP address for the client to work over the internet? For a static IP with my ISP it's like $10 more a month which is to much. I'm thinking I could have a .ini on a free file hosting service that is kept updated with the current server IP and have the client download it every few hours or so. Before I do more to set this up I want to know if it will even work. Help is MUCH appreciated, Hallman
  14. I think this is what you are looking for ... Use the forum search! I just searched (titles only) for BMP and I quickly found this: http://www.autoitscript.com/forum/index.ph...st&p=119090 Hallman
  15. Wow now that is cool. I still cant believe how fast this thing works ... awesome job Hallman
  16. please note that I made the example very quick and dirty and wasn't expecting it to be used as the "official" example. Otherwise I would have done more work Thats cool. Much better. Now it's more ... user friendly which is something I tend to overlook Hallman
  17. No problem. It seems to lag if you make the whole inside white with no blocks and put the start and goal at either end. It shouldn't take so long to path this since there is nothing in the way. A bug maybe? Hallman
  18. I couldn't help myself since this is so cool so I had to make a GUI example. With my script you can "paint" a map then test it. To "paint" a tile, select the type at the bottom then click where you want it on the grid. The same rules apply ... you must have a solid wall (black) border around the parameter of the map. It works great otherwise. Here is the script: And here is a screenshot of it making it's way through a map: Hallman
  19. look up ControlGetText() in the help file to read the text. Hallman
  20. well, right away I can tell it's wrong because you have put "list.jpg" and "list.bmp" as integers (int). Integer = digits 0 - 9. Try "str" (string).
  21. If you want help, make sure you supply as much information you can. Your script prehaps? Maybe tell what you did exactly so we can reproduce the error?
  22. You may have to run the disc defragmentator and/or disk clean up after deleting a directory to free the disk space. Right click the drive, then click properties. To run disk clean up, click the the button that says "Disk Cleanup" under the general tab. To run the defragmentator, select the tools tab and click "Defragment Now" It may take a while depending on the amount of junk and fragmented files on the drive. Hallman
  23. I'm sorry but I fail to see the usefullness of this script ... AutoIt was created to be a fast and easy way to do basic programming. This loses many of the advantages of AutoIt (variables? keywords? loops? nesting functions?) without much gain. Now if you made a tutorial like this for C++ it would make more sense than making a scripting language out of a scripting language. I dont mean to offend! Hallman
  24. ok thanks
×
×
  • Create New...