Jump to content

need to constantly refresh the data


colombeen
 Share

Recommended Posts

Hi guys,

After hours of searching I finally created an account here so I could just ask you all for you advice.

I'm fairly new to the whole auto-it scene and i'm finding it very hard to make data constantly refresh in a GUI.

What I'm trying to create is this :

- small gui build up in 2 columns

- the left side is static and just shows labels with text like Computer name, IP-address, ping google, ...

- on the right side I use labels again and want to constantly update them with the actual IP-address, can/can't ping google, ...

- and with the info gathered like IP, pinging google, ... I show a little info (that fits the given problem like no IP) on what a user can do

for that last one is why the data has to keep refreshing, if the user fixes (a part of) the problem, it should show that like in 5 seconds

See image below for example:

Posted Image

I've tried a lot of things but my code always seems messy, to big, ... anyone of you guys who knows a quick way to create this?

thx

Link to comment
Share on other sites

Hi colombeen,

welcome to AutoIt and the forum.

Usually people post their code, errors they get (if any) and the questions they have.

I'm sure what you want can be done with AutoIt. So what's your problem?

Creating the GUI, updateing the labels?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

This is how I would do it:

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

If @IPAddress1 > 1 Then
    $ipAddress = @IPAddress1
EndIf
If @IPAddress2 > 1 Then
    $ipAddress = @IPAddress1
EndIf
If @IPAddress3 > 1 Then
    $ipAddress = @IPAddress1
EndIf
If @IPAddress4 > 1 Then
    $ipAddress = @IPAddress1
EndIf

$Form1 = GUICreate("Form1", 235, 158, 386, 265)
$Label1 = GUICtrlCreateLabel("Computer Name", 8, 16, 80, 17)
$Label2 = GUICtrlCreateLabel("IP Address", 8, 32, 55, 17)
$Label3 = GUICtrlCreateLabel("Ping Internal Server", 8, 48, 105, 17)
$Label4 = GUICtrlCreateLabel("Ping google.com", 8, 64, 83, 17)
$Label5 = GUICtrlCreateLabel(@ComputerName, 120, 16, 100, 17)
$Label6 = GUICtrlCreateLabel($ipAddress, 120, 32, 100, 17)
$Label7 = GUICtrlCreateLabel("", 120, 48, 100, 17)
$Label8 = GUICtrlCreateLabel("", 120, 64, 100, 17)
$Label9 = GUICtrlCreateLabel("You can try restarting the modem by", 8, 96, 173, 17)
$Label10 = GUICtrlCreateLabel("removingin the power, waiting a few seconds,", 8, 112, 219, 17)
$Label11 = GUICtrlCreateLabel("and plugging the power back in", 8, 128, 153, 17)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    _Pings()
    Sleep(5000)
WEnd

Func _Pings()
    $intServer = 0
    $intServer = Ping("stormyeye01") ; Change this to your internal server's name or IP address
    If $intServer > 0 Then
        GUICtrlSetData($Label7, "OK")
        GUICtrlSetColor($Label7, 0x00FF00)
    Else
        GUICtrlSetData($Label7, "Error")
        GUICtrlSetColor($Label7, 0xFF0000)
    EndIf

    $google = 0
    $google = Ping("google.com")
    If $google > 0 Then
        GUICtrlSetData($Label8, "OK")
        GUICtrlSetColor($Label8, 0x00FF00)
    Else
        GUICtrlSetData($Label8, "Error")
        GUICtrlSetColor($Label8, 0xFF0000)
    EndIf
EndFunc

Note: because of the sleep function lasting 5 seconds, you pretty much would have to exit the program by the icon in the lower right hand corner. Not much of a big deal, though.

#include <ByteMe.au3>

Link to comment
Share on other sites

Hi water

This is what I did :

Create Gui

set background

function to output the labels on the left, and empty labels on the right (empty labels are created like $labelComputerName = GUICtrlCreateLabel....)

set state for the gui

then comes the Do-loop until someone clicks on the close button

there i catch the message from the GUI and run the function to update my labels so that i continues to update

in that last part seems to be my problem... when i run my script i just get black label fields (could be because i remove all the single options to remove the background from each label and tried with GUIsetBkcolor())

also the fields on the right are like 2px by 2px big

and the application seems to be crashing (i think because of the pings)

I'd post my code here, but i don't have it on me to begin with, and i'm a bit embarrased to show it here, looks like crap :-s

@sleepydvdr : I did something simular but i got annoyed by the "not being able to close with the close-button" problem. is one of the reasons why i asked it here... is there a solution for that?

also, i hid the trayicon

Edited by colombeen
Link to comment
Share on other sites

Replace the While loop with:

Global $i = 0
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    If $i > 100 Then
      _Pings()
      $i = 0
    EndIf
    Sleep(50)
    $i = $i + 1
WEnd

So it takes 50/1000 seconds to exit the script but it runs for 50*100/1000 (=5 seconds) before _Pings is called.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I see water came up with a solution. I was curious if it could be done and this is what I came up with:

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Global $time = -1

If @IPAddress1 > 1 Then
    $ipAddress = @IPAddress1
EndIf
If @IPAddress2 > 1 Then
    $ipAddress = @IPAddress1
EndIf
If @IPAddress3 > 1 Then
    $ipAddress = @IPAddress1
EndIf
If @IPAddress4 > 1 Then
    $ipAddress = @IPAddress1
EndIf

$Form1 = GUICreate("Form1", 235, 158)
$Label1 = GUICtrlCreateLabel("Computer Name", 8, 16, 80, 17)
$Label2 = GUICtrlCreateLabel("IP Address", 8, 32, 55, 17)
$Label3 = GUICtrlCreateLabel("Ping Internal Server", 8, 48, 105, 17)
$Label4 = GUICtrlCreateLabel("Ping google.com", 8, 64, 83, 17)
$Label5 = GUICtrlCreateLabel(@ComputerName, 120, 16, 100, 17)
$Label6 = GUICtrlCreateLabel($ipAddress, 120, 32, 100, 17)
$Label7 = GUICtrlCreateLabel("", 120, 48, 100, 17)
$Label8 = GUICtrlCreateLabel("", 120, 64, 100, 17)
$Label9 = GUICtrlCreateLabel("You can try restarting the modem by", 8, 96, 173, 17)
$Label10 = GUICtrlCreateLabel("removing the power, waiting a few seconds,", 8, 112, 219, 17)
$Label11 = GUICtrlCreateLabel("and plugging the power back in", 8, 128, 153, 17)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch

    If $time = -1 Then ; this should only run once
        _StartTimer()
    EndIf

    Sleep(10)
    If TimerDiff($time) > 5000 Then
        _Pings()
        $time = 0
        $time = TimerInit()
    EndIf
WEnd

Func _Pings()
    $intServer = 0
    $intServer = Ping("stormyeye01") ; Change this to your internal server's name
    If $intServer > 0 Then
        GUICtrlSetData($Label7, "OK")
        GUICtrlSetColor($Label7, 0x00FF00)
    Else
        GUICtrlSetData($Label7, "Error")
        GUICtrlSetColor($Label7, 0xFF0000)
    EndIf

    $google = 0
    $google = Ping("google.com")
    If $google > 0 Then
        GUICtrlSetData($Label8, "OK")
        GUICtrlSetColor($Label8, 0x00FF00)
    Else
        GUICtrlSetData($Label8, "Error")
        GUICtrlSetColor($Label8, 0xFF0000)
    EndIf
EndFunc

Func _StartTimer()
    $time = TimerInit()
EndFunc
Edited by sleepydvdr

#include <ByteMe.au3>

Link to comment
Share on other sites

This works, thx water & sleepydvdr

one more question... i have a virtual NIC (for virtualbox) but when i run the script, it uses my @IPAddress2 because that's bigger then 1, but it isn't an actual real IP, only one for the network bridge.

how can i check for the right IP?

Link to comment
Share on other sites

This works, thx water & sleepydvdr

one more question... i have a virtual NIC (for virtualbox) but when i run the script, it uses my @IPAddress2 because that's bigger then 1, but it isn't an actual real IP, only one for the network bridge.

how can i check for the right IP?

If you ping @IPAddress2, does it respond? If it doesn't, you could throw in a statement to ignore that address. Is that IP address significantly different for your real IP address? If so, you could use a clause like IF @IPAddress > 191 (most home IP addresses are in the range of 192.168.1.x).

It might help if you tell us what the IP addresses are.

#include <ByteMe.au3>

Link to comment
Share on other sites

If you ping @IPAddress2, does it respond? If it doesn't, you could throw in a statement to ignore that address. Is that IP address significantly different for your real IP address? If so, you could use a clause like IF @IPAddress > 191 (most home IP addresses are in the range of 192.168.1.x).

It might help if you tell us what the IP addresses are.

Can't I check if the IP is like 0.0.0.0 or starting with 169.XX.XX.XX

if i can exclude certain IP-ranges that could do the trick

now i did something like

If Not (@IPAddress1 = "0.0.0.0") And Not (@IPAddress1 = 169) Then

but it doesn't work

Edited by colombeen
Link to comment
Share on other sites

There are lots of ways to accomplish what you want. I believe AutoIt ignores everything after the second decimal, so you could do something like this:

If @IPAddress > 0 And @IPAddress < 170 Then
$ipAddress = $ipAddress ; Changes nothing
Else
$ipAddress = @IPAddress
EndIf

If the extra decimals cause a problem, you could use StringSplit to grab the first octect and use Number to convert it to a number.

Edited by sleepydvdr

#include <ByteMe.au3>

Link to comment
Share on other sites

There are lots of ways to accomplish what you want. I believe AutoIt ignores everything after the second decimal, so you could do something like this:

If @IPAddress > 0 And @IPAddress < 170 Then
$ipAddress = $ipAddress ; Changes nothing
Else
$ipAddress = @IPAddress
EndIf

If the extra decimals cause a problem, you could use StringSplit to grab the first octect and use Number to convert it to a number.

I tried on @IPAddress2 :

If Not (@IPAddress2 = 169) Then

...

But that didn't work :-s

When I use the full IP with quotes, it does work... so it does use the full IP

EDIT:

I'm currently recreating my script with the adjustments you guys gave me.

also working in some IP checking stuff etc

EDIT 2 :

This is what i have so far

#NoTrayIcon
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
; Create a window for the app
GUICreate("Digipolis Netwerk Controle", 280, 300)
; Set a background for the window
GUICtrlCreatePic("bg.jpg", 0, 0, 280, 300)
GUICtrlSetState(-1, $GUI_DISABLE)
; Set font properties
GUISetFont(8.5, 400, 0, "Arial")
; Fill the window with the labels etc
_GUICtrlCreateLabel(@ComputerName, 10, 10, 260, 20, 1, 12, 1)
_GUICtrlCreateLabel("OS", 20, 40, 100, 12, 1)
_GUICtrlCreateLabel("Gebruikersnaam", 20, 55, 100, 12, 1)
_GUICtrlCreateLabel("Pingen naar Telenet", 20, 70, 130, 12, 1)
_GUICtrlCreateLabel("Pingen naar StadGent", 20, 85, 130, 12, 1)
_GUICtrlCreateLabel("IP adres(sen)", 20, 100, 100, 12, 1)
$labelOS = _GUICtrlCreateLabel(@OSVersion & " " & @OSServicePack, 130, 40, 130, 12, 0, 8.5, 2)
$labelUSER = _GUICtrlCreateLabel(@UserName, 130, 55, 130, 12, 0, 8.5, 2)
$labelTelenet = _GUICtrlCreateLabel("", 130, 70, 130, 12, 0, 8.5, 2)
$labelStadgent = _GUICtrlCreateLabel("", 130, 85, 130, 12, 0, 8.5, 2)
If _checkIP(@IPAddress1) Then
$labelIP1 = _GUICtrlCreateLabel(@IPAddress1, 130, 100, 130, 12, 0, 8.5, 2)
EndIf
If _checkIP(@IPAddress2) Then
$labelIP2 = _GUICtrlCreateLabel(@IPAddress2, 130, 115, 130, 12, 0, 8.5, 2)
EndIf
If _checkIP(@IPAddress3) Then
$labelIP3 = _GUICtrlCreateLabel(@IPAddress3, 130, 130, 130, 12, 0, 8.5, 2)
EndIf
If _checkIP(@IPAddress4) Then
$labelIP4 = _GUICtrlCreateLabel(@IPAddress4, 130, 145, 130, 12, 0, 8.5, 2)
EndIf
; Show the window
GUISetState()
; Refresh the data until the window is closed
Global $i = 0
While 1
    $windowAction = GUIGetMsg()
    Switch $windowAction
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    If $i > 100 Then
  ; Things to update go here
  _tryPing("195.130.130.130", $labelTelenet)
  _tryPing("stadgent", $labelStadgent)
  ; End Things to update go here
      $i = 0
    EndIf
    Sleep(50)
    $i = $i + 1
WEnd
; Extended function to create the label
Func _GUICtrlCreateLabel($varText, $varLeft, $varTop, $varWidth, $varHeight, $varBold = 0, $varSize = 8.5, $varAlign = 0)
$tempLabelId = GUICtrlCreateLabel($varText, $varLeft, $varTop, $varWidth, $varHeight) ; Create the label
GUICtrlSetColor(Default, 0xFFFFFF) ; Set the color
GUICtrlSetBkColor(Default, $GUI_BKCOLOR_TRANSPARENT) ; Set the background transparancy
; Set font weight
If $varBold = 1 Then
  GUICtrlSetFont(Default, $varSize, 600)
EndIf
; Set text alignment
If $varAlign = 1 Then
  GUICtrlSetStyle(Default, $SS_CENTER)
ElseIf $varAlign = 2 Then
  GUICtrlSetStyle(Default, $SS_RIGHT)
EndIf
Return $tempLabelId
EndFunc
; Function to ping server and set the status
Func _tryPing($varServer, $varLabel)
$pingTest = 0
$pingTest = Ping($varServer)
If $pingTest Then
        GUICtrlSetData($varLabel, "OK")
        GUICtrlSetColor($varLabel, 0x00FF00)
    Else
        GUICtrlSetData($varLabel, "Error")
        GUICtrlSetColor($varLabel, 0xFF0000)
    EndIf
EndFunc
; Function to check the IP-address
Func _checkIP($varIP = 0)
If Not ($varIP = 0) Then
  $IParray = StringSplit($varIP, ".")
  If Not ($IParray[1] = "0") And Not ($IParray[1] = "127") And Not ($IParray[1] = "169") Then
   Return True
  EndIf
EndIf
Return False
EndFunc
Edited by colombeen
Link to comment
Share on other sites

Is there a way to run the @IPAddress1, 2, 3, 4 throug a for loop without having to type the 1 or 2 etc but replacing it with $i ?

I want to do this so i can use 1 function to check for valid IP's, and then fill in the IP labels i created in the correct order

so the labels + data could look like this

$labelIP1 = @IPAddress1

$labelIP2 = @IPAddress3

$labelIP3 = ""

$labelIP4 = ""

this shows that the function had to skip IPaddress2 but filled the third one in the place for the second (so that i don't end up with gaps in my GUI)

Link to comment
Share on other sites

No, you can't. There is a function called Eval which only works with variables but should really only be used when there is a real need for it.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

I fixed it by changing $labelIP1 etc to an array called $labelIP

i fill it with the macros and then i can run it through the loop without lots of code...

my first, basic version is almost ready

just some minor things that i'd like to change like when the ping stuff is happening, i'd like to see a loading image, when done pinging, the loading image should be replaced by a OK-image or an ERROR-image

still searching on how to do that (if someone has any experience with this, any help is welcome :-) )

Edited by colombeen
Link to comment
Share on other sites

If you have SciTE4AutoIt3 then have a look at #AutoIt3Wrapper_Res_File_Add and the

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

If you have SciTE4AutoIt3 then have a look at #AutoIt3Wrapper_Res_File_Add and the

I tried this but it isn't working

these lines i've changed :

#AutoIt3Wrapper_Res_File_Add=bg.jpg, rt_rcdata, THE_BG
#include <resources.au3>
; Set a background for the window
$appBG = GUICtrlCreatePic("", 0, 0, 280, 300)
_ResourceSetImageToCtrl($appBG, "THE_BG")
GUICtrlSetState($appBG, $GUI_DISABLE)

EDIT:

lol, tried to compile again a few minutes later, and it works now

Edited by colombeen
Link to comment
Share on other sites

Yes, you have to compile it for it to work, otherwise if you want to run from SciTE then just use GUICtrlSetImage().

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Look at this GIF UDF by trancexx >>

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...