Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/06/2014 in all areas

  1. It maybe simplier than it seems - you can compile small autoit exe and make it "default browser". So windows do all work, and you choice browser to start as Danyfirex suggested.
    1 point
  2. DreamVB

    DM ClassicRadio

    hi this is a small Internet radio player I been working on for the past week. it's still not completely finished yet but it is functional it comes with some added channels, you can Play, Stop, Pause Change volume, option to open URLS from the Internet and mute the sound. Note to make this work you need the WMPlayer.ocx. also the stations at the moment need to be edited in notepad, As i have to still yet think of an idea to allow you to add your own. Anyway hope you like it MyRadioPlayer.zip
    1 point
  3. OK, I just edited _WinAPI_DeleteProfile (it's a missing : after reading your post about unicode, I changed functions to use unicode, but forgot this parameter). For the last function, I don't know myself what I wanted do to.. In fact, I just get lost with MSDN when it says Pointer to a variable that receives the profile type... Sometime I need to use a pointer, sometime not, even if MSDN talk about pointer... It seems to not want to get into my head !
    1 point
  4. You can use a WMI query to find out if the device is an USB one or not. Here is an example : Local $aUSBDrives = _ListUSBVolumes() Local $iRunFromUSB = 0 For $i = 1 To $aUSBDrives[0] If StringRegExp( @ScriptDir, "(?i)^" & $aUSBDrives[$i]) Then $iRunFromUSB = 1 ExitLoop EndIf Next If $iRunFromUSB Then MsgBox(0, "", "OK") Else MsgBox(16, "", "The program must be launched from an USB drive !") EndIf ; #FUNCTION# ==================================================================================================================== ; Name ..........: _ListUSBVolumes ; Description ...: List USB volumes ; Syntax ........: _ListUSBVolumes() ; Parameters ....: None ; Return values .: An array of strings (USB drive letter followed by colon) of drives found. ; The zeroth array element contains the number of drives. ; Author ........: jguinch ; =============================================================================================================================== Func _ListUSBVolumes() Local $aResult[1] Local $oDrive, $sDeviceID, $oPartitions, $oPartition, $oLogicalDisks, $oLogicalDisk, $sDriveLetter Local $oWMIService = ObjGet("winmgmts:\\" & @ComputerName & "\root\cimv2") Local $oDiskDrives = $oWMIService.ExecQuery("SELECT * FROM Win32_DiskDrive Where InterfaceType = 'USB'") For $oDrive In $oDiskDrives $sDeviceID = StringReplace($oDrive.DeviceID, "\", "\\") $oPartitions = $oWMIService.ExecQuery _ ("ASSOCIATORS OF {Win32_DiskDrive.DeviceID=""" & _ $sDeviceID & """} WHERE AssocClass = " & _ "Win32_DiskDriveToDiskPartition") For $oPartition In $oPartitions $oLogicalDisks = $oWMIService.ExecQuery _ ("ASSOCIATORS OF {Win32_DiskPartition.DeviceID=""" & _ $oPartition.DeviceID & """} WHERE AssocClass = " & _ "Win32_LogicalDiskToPartition") For $oLogicalDisk In $oLogicalDisks $sDriveLetter = $oLogicalDisk.DeviceID If $sDriveLetter <> "" Then Redim $aResult[ UBound($aResult) + 1] $aResult[ UBound($aResult) - 1] = $sDriveLetter EndIf Next Next Next $aResult[0] = UBound($aResult) - 1 Return $aResult EndFunc
    1 point
  5. Sorry,couldn't resist...
    1 point
×
×
  • Create New...