Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/21/2016 in all areas

  1. Here some graphical examples written completely in FreeBasic just for fun. _WinAPI_SetWindowTitleIcon Check for Numeric Entry in an EditBox using RegEx CreateWindowEx (hGUI) Example FB 3D Starfield Rotating Flight FB File2Bas Code Generator FB Fire Particles FB Fireworks FB GFX Examples FB Image to Trapezoid Transformation FB Layered Parallax Effect FB Plasma FB Puristic Clock FB Rotating Cube FB Rotating Earth FB Rutt Etra Izer Effect FB Simple Recursive Tree Generator FB Snowfall FB Tunnel Flight FB Water Effect FMOD Examples GDI - GDI+ 3D Sinus Wave GDI - GDI+ Animated Pythagoras Tree GDI - GDI+ Bezier Lines GDI - GDI+ Particles - Repulsive Force Sim v2.0 GDI - GDI+ Plasma v5 Booster GDI - GDI+ Random Pattern GDI - GDI+ Space Flight GDI - GDI+ Tunnel Flight - WipeOut Style GDI Classic Raytraced Tunnel GDI Elastic Twister Effect GDI Exploding Pixels GDI Infinite Image Zoom Flight GDI Liquid Pixels GDI Mandelbrot GDI Particle Repulsion Grid GDI Particles Mouse Attraction GDI Starfield GDI The Nautilus Raymarcher GDI Worm Tunnel Flight GDI+ 3D Starfield Scrolling v1 Booster GDI+ 3D Starfield Scrolling v3 Booster GDI+ Convert Bitmap to ASCII GDI+ GIF Anim to ASCII Player GDI+ Image Painting GDI+ Impossible Possible GDI+ Kaleidoscope GDI+ Performance Test - Au3 vs FB GDI+ Polar Clock GDI+ Rotating Earth GDI+ Spiral Text GDI+ Star Wars Scroller GDI+ Streamer GDI+ Swiss Railway Clock GDI+ The MATRIX Ini Read - Write Rutt_Etra_Izer_Booster Stack TitchySID uFMOD Download: FreeBasic Examples build 2019-05-08.rar I will add new examples from time to time. FreeBasic source codes are also included.
    1 point
  2. Well that is my job too. I work as an IT support engineer, and this is one of the many aspects of my job I do every day. But I appreciate the complement nonetheless.
    1 point
  3. Believe it or not, I am still a student. College of course. Finishing up my last couple of classes for my bachelors in Information Technology. I have been using autoit for about 2 years now, and it is by far my favorite scripting language. After my first internship in which I got a taste of what working in IT was like, I loved it. Since then, I have been teaching myself more about applying IT principles in enterprise environments by setting up my own domain controller, web server, and applying new IT concepts I discover to my environment (but makes my room hotter than the deepest pit in hell!). But I particularly love scripting, just because it allows us to develop ways to make computers do the bulk of the work much faster than we could hope to do manually. And isn't that the whole point of having computers? When I see technology becoming more of a hindrance than benefit, and nobody seems to care, that is a personal pet peeve of mine. But anyhow, thats me.
    1 point
  4. Sure dude. All I did was call the file itself without its path as the main file to execute. Then, if you look at both the Run and ShellExecute functions in the help file, you will see that I put the path for the directory which contains the executable which you were trying to run as the working directory parameter. So essentially, I told the function "I want you to run this file. It is in this folder." Rather than what we were doing before "I want you to run 'the entire path to this file'". I will look in my default folder for that file." Does that make sense?
    1 point
  5. Try: $webBrowser = _IECreate("http://google.com", 0, 0, 1) $sText = _IEBodyReadText($webBrowser) $sSearchfor = "google.com.ph" ; Edit this $iLength = StringLen($sSearchfor) ; Don't edit this $iPosition = StringInStr($sText, $sSearchfor) $sString = StringMid("" & $sText & "", $iPosition + $ilength, 5) MsgBox(0, "Test", $sString)
    1 point
  6. By the way, for client devices, the "remote registry" service is disabled by default. I would assume that to get this to work, you would need enable the service and ensure that it is running.
    1 point
  7. I agree with legend. If this script is meant to be used in a live environment where end users are going to potentially try to stop the execution of the script, then you might want to include "Opt("TrayAutoPause", 0)" at the beginning so that clicking the toolbar icon does not pause the execution of the scripts, so that the vulnerability described by legend cannot take place
    1 point
  8. Hello Dean. You are not the first to experience confusion in regards to run vs shellexecute, so I wanted offer some clarification for you. Think of "Run" as the run prompt you see when pressing "Win + R" and can also be used to launch base command line exectuables (Ususally in C:\Windows\System32). However, if you open your run prompt and input the full path to the application exe that launches the application, that would also not work. What you can do, if for some reason you absolutely needed to use run, is use run in conjunction with the macro "@Comspec" to run the command prompt and pass the application to the command prompt as a parameter, which will launch the application: Run( @Comspec & " /c C:\Program Files\3SpaceSensor\3SpaceSuite.exe" )
    1 point
  9. Might be interesting to post the code as a demo for people to try.
    1 point
  10. 1 point
  11. There is a moderator whose name is @Melba23. The abbreviation for his name is M23. Check his signature block.
    1 point
  12. Jos

    SciTE Editor visual quality

    Copy this in your SciTEUser.properties and try values from 0 to 3 to see if that makes a difference: technology=1 Jos
    1 point
  13. Ok, I found this GUICtrlSetState($HID, $GUI_ONTOP) If there were a way to set this to $GUI_ONBOTTOM or a specific Z index that would be better... Playing with it.
    1 point
  14. nice, but you could just suspend protect1 and protect2 and then close the real script, and afterwards protect1 and protect2 but what is the purpose of a persistence process?
    1 point
  15. Hi DeanP, And welcome.. Give ShellExcecute a try... Bill
    1 point
  16. Sorry, I made some errors. Try this one please (replace $sEthernetAdapter and $sWirelessAdapter values) . It works well for me: #RequireAdmin Global $objWMIService = ObjGet("winmgmts:\\.\root\wmi") Global $oCIMV2 = ObjGet("winmgmts:\\.\root\CIMV2") Global $sEthernetAdapter = "Broadcom NetXtreme 57xx Gigabit Controller" Global $sWirelesstAdapter = "Intel(R) WiFi Link 5100 AGN" Global $oDisconnectLAN = $oCIMV2.ExecQuery("select * from Win32_NetworkAdapter Where Name = '" & $sEthernetAdapter & "' And NetConnectionStatus = 0") If $oDisconnectLAN.Count Then _NetworkSetState($sWirelesstAdapter, 1) Else _NetworkSetState($sWirelesstAdapter, 0) EndIf Dim $strComputer, $SINK1, $SINK2, $objWMIService $strComputer = "127.0.0.1" $SINK1 = ObjCreate("WbemScripting.SWbemSink") $SINK2 = ObjCreate("WbemScripting.SWbemSink") ObjEvent($SINK1, "OnConnect_") ObjEvent($SINK2, "OnDisconnect_") If Not @error Then $objWMIService.ExecNotificationQueryAsync ($SINK1, "SELECT * FROM MSNdis_StatusMediaConnect") $objWMIService.ExecNotificationQueryAsync ($SINK2, "SELECT * FROM MSNdis_StatusMediaDisconnect") EndIf ConsoleWrite("In monitoring mode. Press Ctrl+C to exit." & @CRLF) While 1 Sleep(10000) WEnd Func OnConnect_OnObjectReady($objLatestEvent, $objAsyncContext) If $objLatestEvent.InstanceName = $sEthernetAdapter Then _NetworkSetState($sWirelesstAdapter, 0) ; <--- disable the wireless adapter EndIf EndFunc Func OnDisconnect_OnObjectReady($objLatestEvent, $objAsyncContext) If $objLatestEvent.InstanceName = $sEthernetAdapter Then _NetworkSetState($sWirelesstAdapter, 1) ; <--- enable the wireless adapter EndIf EndFunc Func _NetworkSetState($sAdapter, $iState) Local $oAdapters = $oCIMV2.ExecQuery("select * from Win32_NetworkAdapter where Name = '" & $sAdapter & "'") If Not IsObj($oAdapters) Then Return SetError(1, 0, 0) For $oAdapter In $oAdapters Return ($iState ? $oAdapter.Enable : $oAdapter.Disable) Next EndFunc
    1 point
  17. martin

    Drag a control.

    AutoIt can do the mind reading bit. #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <MenuConstants.au3> $hGUI = GUICreate("Test", 500, 500) $cButton = GUICtrlCreateButton("Click or Drag", 40, 100, 100, 23) GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN, $cButton ; Are we moving? $cInfo = GUIGetCursorInfo($hGUI) $aPos = ControlGetPos($hGUI, "", $cButton) $iSubtractX = $cInfo[0] - $aPos[0] $iSubtractY = $cInfo[1] - $aPos[1] Sleep(200) $cInfo = GUIGetCursorInfo($hGUI) If $cInfo[2] = 1 Then $cInfo = GUIGetCursorInfo($hGUI) If $cInfo[4] = $cButton Then Do $cInfo = GUIGetCursorInfo($hGUI) ControlMove($hGUI, "", $cButton, $cInfo[0] - $iSubtractX, $cInfo[1] - $iSubtractY) Until Not $cInfo[2] EndIf ; Empty event queue to prevent the button firing Else MsgBox(0, "Hi", "Button pressed") EndIf Do Until GUIGetMsg() = 0 EndSwitch WEnd
    1 point
  18. you can always cheat ; new1.au3 before compile winwaitactive("Choose a file.") WinMove ( "Choose a file.", "", 100, 100) run("new1.exe") $var = FileOpenDialog( "Choose a file.", "c:\program files", "My Files (*.au3)", 1 + 4 ) or get more complex: ; new1.au3 before compile winwaitactive("Choose a file.") if $CmdLine[0] >0 then WinMove ( "Choose a file.", "", $CmdLine[1] , $CmdLine[2] ) else WinMove ( "Choose a file.", "", 100, 100) endif run('new1.exe 100 200 ') $var = FileOpenDialog( "Choose a file.", "c:\program files", "My Files (*.au3)", 1 + 4 ) or even: AutoItSetOption("ExpandEnvStrings", 1) $arguments="100 200" FileInstall(".\new1.exe", "%temp%\new1.exe") run("%TEMP%\new1.exe " & $Arguments, "%temp%", @SW_HIDE ) $var = FileOpenDialog( "Choose a file.", "c:\program files", "My Files (*.au3)", 1 + 4 ) ;Delete the new1.exe file. FileDelete ("%TEMP%\new1.exe") Anyway that is off the top of my head. I did a similar thing a few times.
    1 point
×
×
  • Create New...