Sign in to follow this  
Followers 0
ashley

Guictrlread broken

4 posts in this topic

ok, im trying to get it to read 3 lines in a listview... and if they all say not installed then a message box pops up

but it dont work.

CODE
; ~~~~~ PC Check-up ~~~~~ ;

; ~~~~~ What does it do? ~~~~~ ;

; ~~~~~ PC Check-up will check your PC for programs that defend your PC(defenders, Anti-virus') ~~~~~ ;

; ~~~~~ This is a BETA Version, This will contain bugs ~~~~~ ;

; ~~~~~ Made by Ashley ~~~~~ ;

#include <GUIConstants.au3>

#include <IE.au3>

Global $P_bar

_IEErrorHandlerRegister ()

;GUI

$MAIN_GUI = GUICreate("PC Check-up!", 1000, 600)

;Welcome

$Label1 = GUICtrlCreateLabel("Welcome to PC Check-up!", 4, 8, 600, 25)

GUICtrlSetFont(-1, 15)

; Inf5

$whatdoesitdo = GUICtrlCreateGroup("What does it do?", 4, 34, 293, 57)

$Label2 = GUICtrlCreateLabel("This will make sure that your PC is 100% protected", 16, 48, 241, 17)

$Label3 = GUICtrlCreateLabel("It will also recommend programs to keep it 100% protected", 16, 64, 277, 17)

$Status = GUICtrlCreateLabel("Status: STILL", 810, 576, 150, 17)

GUICtrlCreateGroup("", -99, -99, 1, 1)

;buttons

$Post = GUICtrlCreateButton(" Post ", 945, 540, 50, 25)

$Check = GUICtrlCreateButton(" Check ", 945, 570, 50, 25)

$Update = GUICtrlCreateButton( "Update ", 890, 540, 50, 25)

;Listview'Select

;1

$Def_ListView = GUICtrlCreateListView("Files|Status", 4, 97, 294, 235, $LVS_REPORT, BitOR($WS_EX_CLIENTEDGE, $LVS_EX_GRIDLINES))

GUICtrlSendMsg(-1, 0x101E, 0, 150)

GUICtrlSendMsg(-1, 0x101E, 1, 139)

$Def_ListView_0 = GUICtrlCreateListViewItem("Windows Defender | Unchecked", $Def_ListView)

;2

$AV_ListView = GUICtrlCreateListView("Files|Status", 4, 337, 294, 235, $LVS_REPORT, BitOR($WS_EX_CLIENTEDGE, $LVS_EX_GRIDLINES))

GUICtrlSendMsg(-1, 0x101E, 0, 150)

GUICtrlSendMsg(-1, 0x101E, 1, 139)

$AV_ListView_1 = GUICtrlCreateListViewItem("Norton Protection Center | Unchecked", $AV_ListView)

$AV_ListView_2 = GUICtrlCreateListViewItem("Avast! | Unchecked", $AV_ListView)

$AV_ListView_3 = GUICtrlCreateListViewItem("AVG | Unchecked", $AV_ListView)

;Progress bar

$P_bar = GUICtrlCreateProgress(4, 575, 800, 17)

;IE

$oIE = _IECreateEmbedded ()

GUICtrlCreateObj($oIE, 304, 8, 690, 530)

GUISetState(@SW_SHOW)

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case -3

Exit

Case $check

def_check()

Case $post

_IENavigate ($oIE, "http://www.autoitscript.com/forum/index.php?showtopic=60555&st=0")

Case $Update

MsgBox(48, "Info...", "Automatic Update is not available in this version")

EndSwitch

WEnd

Func Def_check()

GUICtrlSetData($Status, "Status: Scaning...")

Sleep(1000)

GUICtrlSetData($Status, "Status: Checking Defender...")

GUICtrlSetData($P_bar, 5)

If FileExists(@ProgramFilesDir &"\Windows Defender\MsAsCui.exe") Then

GUICtrlSetData($Def_ListView_0 , "Windows Defender | Found")

Else

GUICtrlSetData($Def_ListView_0 , "Windows Defender | Not Installed")

EndIf

AV_check()

endFunc

Func AV_check()

;Anti-Virus If's

;Norton

GUICtrlSetData($P_bar, 15)

GUICtrlSetData($Status, "Status: Checking Norton...")

sleep(1000)

If FileExists(@ProgramFilesDir & "\Norton Internet Security\nisoptui.exe") Then

GUICtrlSetData($AV_ListView_1, "Norton Protection Center | Found")

Else

GUICtrlSetData($AV_ListView_1, "Norton Protection Center | Not Installed")

EndIf

GUICtrlSetData($P_bar, 20)

;Avast!

GUICtrlSetData($Status, "Status: Checking Avast!...")

sleep(1000)

If RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ashAvast.exe", "") Then

GUICtrlSetData($AV_ListView_2, "Avast! | Found")

Else

GUICtrlSetData($AV_ListView_2, "Avast! | Not Installed")

EndIf

GUICtrlSetData($P_bar, 25)

;AVG

GUICtrlSetData($Status, "Status: Checking AVG...")

sleep(1000)

If RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AVGW.exe", "") Then

GUICtrlSetData($AV_ListView_3, "AVG | Found")

Else

GUICtrlSetData($AV_ListView_3, "AVG | Not Installed")

EndIf

GUICtrlSetData($P_bar, 30)

reco()

EndFunc

Func reco()

GUICtrlSetData($Status, "Status: Checking stats...")

GUICtrlSetData($P_bar, 35)

sleep(1000)

;defenders

If GUICtrlRead($Def_ListView_0) = "Windows Defender | Not Installed" Then

MsgBox(0, "Your Pc is not 100% protected...", "Your Pc is not 100% protected, please download Windows defender to fix this problem. You will Get this message every time you run 'all-in-one protection center' unless you have it installed.")

_IENavigate ($oIE, "http://www.microsoft.com/athome/security/spyware/software/default.mspx")

EndIf

GUICtrlSetData($P_bar, 40)

recoav()

EndFunc

Func recoav()

GUICtrlSetData($P_bar, 45)

If GUICtrlRead($AV_ListView_1) = "Norton Protection Center | Not Installed" and GUICtrlRead($AV_ListView_2) = "Avast! | Not Installed" and GUICtrlRead($AV_ListView_3, "AVG | Not Installed") Then

MsgBox(0, "Your Pc is not 100% protected...", "You dont seem to have any Anti-virus protection... If you do have any sort of Anti-virus Protection then click on 'Post' and provide me with the name of the anti-virus protection program that you have.")

EndIf

GUICtrlSetData($P_bar, 50)

Sleep(1000)

GUICtrlSetData($Status, "Status: Stats checked")

Sleep(1000)

GUICtrlSetData($Status, "Status: SCAN COMPLETED")

EndFunc

any ideas?

Share this post


Link to post
Share on other sites



I get a msgbox... seems to work for me.


Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

I didn't get any box either until i changed your if statement to :

If GUICtrlRead($AV_ListView_1,1) = "Norton Protection Center | Not Installed|" and GUICtrlRead($AV_ListView_2,1) = "Avast! | Not Installed|" and GUICtrlRead($AV_ListView_3,1) = "AVG | Not Installed|" Then

My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! you’re the best in town Fight!

Share this post


Link to post
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
Sign in to follow this  
Followers 0