Sign in to follow this  
Followers 0
scila1996

FOR ... NEXT Problem

7 posts in this topic

I am a novice programmer. We wish you detailed instructions

I want to create 1 notification list VGA devices installed

For $ida = 1 to 5
    $getvga = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\000" & $ida,"DriverDesc")
    MsgBox(0,"Get VGA",$getvga)
Next
there is one small problem. 
 
I want it to show only one message devices list

Share this post


Link to post
Share on other sites



Something like this ?

Local $getvga = ""

For $ida = 1 to 5
    $getvga &= RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\000" & $ida,"DriverDesc") & @CrLf
Next

MsgBox(0,"Get VGA",$getvga)

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
Thank
 
I have one small problem anymore 
 
if the value from 2 to 5 = empty 
 
it will not appear in the large white space below the message
 
 
post-84392-0-38925700-1395981558_thumb.p
 
Like
 
post-84392-0-20663000-1395981561_thumb.p

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

What about reading the helpfile? Or think a little bit at least.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

check the variable to see if it's a empty string. if empty string ignore else add to the getvga variable.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Try. Please, use and read the help file {F1}

Local $sVGA = ""

For $i = 1 to 5

$sGetVGA = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\000" & $i,"DriverDesc")

If $sGetVGA <> "" Then
    $sVGA = $sGetVGA & @CRLF
EndIf

Next

MsgBox(0,"Get VGA",$sVGA)
Edited by GordonFreeman

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