-
Posts
547 -
Joined
-
Last visited
-
Days Won
4
Starstar last won the day on May 31 2015
Starstar had the most liked content!
About Starstar
- Birthday 09/09/1994
Profile Information
-
Member Title
A Patriot...
-
Interests
Computers,politics,Cricket,program coding and in my country.,.,."..:';,,....
Starstar's Achievements
-
Parsix reacted to a post in a topic: I am trying Rasdial() DLL function
-
Parsix reacted to a post in a topic: I am trying Rasdial() DLL function
-
Starstar reacted to a post in a topic: GUI for managing database
-
LukeLe reacted to a post in a topic: Automatically Run Script on Windows Start
-
OutlookTools: Import/Export from/to iCal/vCard/CSV
Starstar replied to water's topic in AutoIt General Help and Support
Great idea -
Starstar reacted to a post in a topic: OutlookTools: Import/Export from/to iCal/vCard/CSV
-
antonioj84 reacted to a post in a topic: Network configuration UDF
-
Stuck in RasSetEntryProperties plz help
Starstar replied to Starstar's topic in AutoItX Help and Support
Dll is a hell......... -
Stuck in RasSetEntryProperties plz help
Starstar replied to Starstar's topic in AutoItX Help and Support
Thanx Danyfire -
Starstar reacted to a post in a topic: Stuck in RasSetEntryProperties plz help
-
Stuck in RasSetEntryProperties plz help
Starstar replied to Starstar's topic in AutoItX Help and Support
Can you point out which field i missed? i also tried Unicode like this dim $vbNullString=Chr(0) Global Enum $ERROR_SUCCESS=0, $ERROR_INVALID_NAME=123, $ERROR_ALREADY_EXISTS=183, $ERROR_CANNOT_FIND_PHONEBOOK=82 Global Const $ERROR_BUFFER_TOO_SMALL = 603 Global Const $RAS_MaxAreaCode = 10 Global Const $RAS_MaxPhoneNumber = 128 Global Const $RAS_MaxDeviceType = 16 Global Const $RAS_MaxDeviceName = 128 Global Const $RAS_MaxPadType = 32 Global Const $RAS_MaxX25Address = 200 Global Const $RAS_MaxFacilities = $RAS_MaxX25Address Global Const $RAS_MaxUserData = $RAS_MaxFacilities Global Const $RAS_MaxDnsSuffix = 256 Global Const $RAS_MaxEntryName = 256 Global Const $WM_RASDIALEVENT = 0xCCCD Global Const $RASCS_DONE = 0x2000 Global Const $WAIT_OBJECT_0 = 0 Global $hConection = 0 Global Const $MAX_PATH = 256 $Str_RASENTRY = "struct;dword dwSize;dword dwfOptions;dword dwCountryID;dword dwCountryCode;wchar szAreaCode["&$RAS_MaxAreaCode + 1&"];wchar szLocalPhoneNumber["&$RAS_MaxPhoneNumber + 1&"];dword dwAlternateOffset;wstr ipaddr;wstr ipaddrDns;wstr ipaddrDnsAlt;wstr ipaddrWins;wstr ipaddrWinsAlt;dword dwFrameSize;dword dwfNetProtocols;dword dwFramingProtocol;wchar szScript["&$MAX_PATH&"];wchar szAutodialDll["&$MAX_PATH&"];wchar szAutodialFunc["&$MAX_PATH&"];wchar szDeviceType[" & $RAS_MaxDeviceType + 1 & "];wchar szDeviceName[" & $RAS_MaxDeviceName + 1 & "];wchar szX25PadType["&$RAS_MaxPadType + 1&"];wchar szX25Address["&$RAS_MaxX25Address + 1&"];wchar szX25Facilities["&$RAS_MaxFacilities + 1&"];wchar szX25UserData["&$RAS_MaxUserData + 1&"];dword dwChannels;dword dwReserved1;dword dwReserved2;dword dwSubEntries;dword dwDialMode;dword dwDialExtraPercent;dword dwDialExtraSampleSeconds;dword dwHangUpExtraPercent;dword dwHangUpExtraSampleSeconds; dword dwIdleDisconnectSeconds;dword dwType;dword dwType;dword dwType;GUID guidId;wchar szCustomDialDll["&$MAX_PATH&"];dword dwVpnStrategy;dword dwfOptions2;dword dwfOptions3;wchar szDnsSuffix["&$RAS_MaxDnsSuffix&"];dword dwTcpWindowSize;wchar szPrerequisitePbk["&$MAX_PATH&"];wchar szPrerequisiteEntry["&$RAS_MaxEntryName + 1&"];dword dwRedialCount;dword dwRedialPause;wstr ipv6addrDns;wstr ipv6addrDnsAlt;dword dwIPv4InterfaceMetric;dword dwIPv6InterfaceMetric;wstr ipv6addr;dword dwIPv6PrefixLength;dword dwNetworkOutageTime" $DLL_RASENTRY = DllStructCreate($Str_RASENTRY) $Str_RASCREDENTIALS = "dword dwSize;dword dwMask;char szUserName[256];char szPassword[256];char szDomain[15]" $DLL_RASCREDENTIALS=DllStructCreate($Str_RASCREDENTIALS) $sDeviceName = "WAN MINIPORT (PPPOE)" $sDeviceType = "Vpn" $sEntryName = "Test" $sServer = "Test" $sUsername = "Test" $sPassword = "Test" $Rasentry = @AppDataDir & "\Microsoft\Network\Connections\Pbk\rasphone.pbk" $size = DllStructGetSize($DLL_RASENTRY) DllStructSetData($DLL_RASENTRY,"dwSize",$size) DllStructSetData($DLL_RASENTRY,"dwCountryCode",86) DllStructSetData($DLL_RASENTRY,"dwCountryID",86) DllStructSetData($DLL_RASENTRY,"dwDialExtraPercent",75) DllStructSetData($DLL_RASENTRY,"dwDialExtraSampleSeconds",120) DllStructSetData($DLL_RASENTRY,"dwDialMode",1) DllStructSetData($DLL_RASENTRY,"dwfNetProtocols",4) DllStructSetData($DLL_RASENTRY,"dwfOptions",1024262928) DllStructSetData($DLL_RASENTRY,"dwfOptions2",367) DllStructSetData($DLL_RASENTRY,"dwFramingProtocol",1) DllStructSetData($DLL_RASENTRY,"dwHangUpExtraPercent",10) DllStructSetData($DLL_RASENTRY,"dwHangUpExtraSampleSeconds",120) DllStructSetData($DLL_RASENTRY,"dwRedialCount",3) DllStructSetData($DLL_RASENTRY,"dwRedialPause",60) DllStructSetData($DLL_RASENTRY,"dwType",5) CopyMemory("szDeviceName",$sDeviceName,StringLen($sDeviceName)) CopyMemory("szDeviceType",$sDeviceType,StringLen($sDeviceType)) CopyMemory("szLocalPhoneNumber",$sServer,StringLen($sServer)) DllStructSetData($DLL_RASENTRY,"dwVpnStrategy","VS_Default") DllStructSetData($DLL_RASENTRY,"dwEncryptionType","ET_Optional") DllStructSetData($DLL_RASCREDENTIALS,"dwSize",DllStructGetSize($DLL_RASCREDENTIALS)) DllStructSetData($DLL_RASCREDENTIALS,"dwMask",11) CopyMemory("szUserName",$sUsername,StringLen($sUsername)) CopyMemory("szPassword",$sPassword,StringLen($sPassword)) $Iret= DllCall("rasapi32.dll","dword","RasSetEntryPropertiesW","wstr",$Rasentry,"wstr",$sEntryName,"dword*",$DLL_RASENTRY,"dword",$size,"byte",$vbNullString,"dword",0) MsgBox(0,"",$Iret[0]) Func CopyMemory($Destination, $Source, $Length) Local $Return $Return = DllCall("kernel32.dll", "none", "RtlMoveMemory", "ptr", $Destination, "ptr", $Source,"int", $Length) Return $Return[0] EndFunc But until i got error 632 -
Stuck in RasSetEntryProperties plz help
Starstar replied to Starstar's topic in AutoItX Help and Support
Thanks Danyfirex -
Starstar reacted to a post in a topic: Stuck in RasSetEntryProperties plz help
-
dim $vbNullString=Chr(0) $Str_RASENTRY = "dword dwSize;dword dwfOptions;dword dwCountryID;dword dwCountryCode;char szLocalPhoneNumber[128];dword dwfNetProtocols;dword dwFramingProtocol;char szDeviceType[16];char szDeviceName[128];dword dwDialMode;dword dwDialExtraPercent;dword dwDialExtraSampleSeconds;dword dwHangUpExtraPercent;dword dwHangUpExtraSampleSeconds;dword dwType;dword dwEncryptionType;dword dwVpnStrategy;dword dwfOptions2;dword dwRedialCount;dword dwRedialPause" $DLL_RASENTRY = DllStructCreate($Str_RASENTRY) $Str_RASCREDENTIALS = "dword dwSize;dword dwMask;char szUserName[256];char szPassword[256];char szDomain[15]" $DLL_RASCREDENTIALS=DllStructCreate($Str_RASCREDENTIALS) $sDeviceName = "WAN MINIPORT (PPPOE)" $sDeviceType = "Vpn" $sEntryName = "Test" $sServer = "Test" $sUsername = "Test" $sPassword = "Test" $Rasentry = @AppDataDir & "\Microsoft\Network\Connections\Pbk\rasphone.pbk" $size = DllStructGetSize($DLL_RASENTRY) DllStructSetData($DLL_RASENTRY,"dwSize",$size) DllStructSetData($DLL_RASENTRY,"dwCountryCode",86) DllStructSetData($DLL_RASENTRY,"dwCountryID",86) DllStructSetData($DLL_RASENTRY,"dwDialExtraPercent",75) DllStructSetData($DLL_RASENTRY,"dwDialExtraSampleSeconds",120) DllStructSetData($DLL_RASENTRY,"dwDialMode",1) DllStructSetData($DLL_RASENTRY,"dwfNetProtocols",4) DllStructSetData($DLL_RASENTRY,"dwfOptions",1024262928) DllStructSetData($DLL_RASENTRY,"dwfOptions2",367) DllStructSetData($DLL_RASENTRY,"dwFramingProtocol",1) DllStructSetData($DLL_RASENTRY,"dwHangUpExtraPercent",10) DllStructSetData($DLL_RASENTRY,"dwHangUpExtraSampleSeconds",120) DllStructSetData($DLL_RASENTRY,"dwRedialCount",3) DllStructSetData($DLL_RASENTRY,"dwRedialPause",60) DllStructSetData($DLL_RASENTRY,"dwType",5) CopyMemory("szDeviceName",$sDeviceName,StringLen($sDeviceName)) CopyMemory("szDeviceType",$sDeviceType,StringLen($sDeviceType)) CopyMemory("szLocalPhoneNumber",$sServer,StringLen($sServer)) DllStructSetData($DLL_RASENTRY,"dwVpnStrategy","VS_Default") DllStructSetData($DLL_RASENTRY,"dwEncryptionType","ET_Optional") DllStructSetData($DLL_RASCREDENTIALS,"dwSize",DllStructGetSize($DLL_RASCREDENTIALS)) DllStructSetData($DLL_RASCREDENTIALS,"dwMask",11) CopyMemory("szUserName",$sUsername,StringLen($sUsername)) CopyMemory("szPassword",$sPassword,StringLen($sPassword)) $Iret= DllCall("rasapi32.dll","dword","RasSetEntryProperties","str",$Rasentry,"str",$sEntryName,"dword*",$DLL_RASENTRY,"dword",$size,"byte",$vbNullString,"dword",0) MsgBox(0,"",$Iret[0]) Func CopyMemory($Destination, $Source, $Length) Local $Return $Return = DllCall("kernel32.dll", "none", "RtlMoveMemory", "ptr", $Destination, "ptr", $Source,"int", $Length) Return $Return[0] EndFunc Error 632 = Incorrect structure size.
-
Waiting for in program process to finish
Starstar replied to imagine's topic in AutoIt General Help and Support
Title: Progress [84%].Progress [85%].Progress [86%]............ title is changing continuously So.........Using WinGetTitle() allow you to know the progress status. Or Simply try like this...... For $n = 1% To 100% WinWaitClose("Progress "&"["&$n&"]") Because Title is changing.......... -
$gui = GUICreate("Start & Stop",150,250) $btn1 = GUICtrlCreateButton("Start",60,100,50,25) $btnExit = GUICtrlCreateButton("Exit",5,100,50,25) $label = GUICtrlCreateLabel("",10,10,100,30) GUISetState(@SW_SHOW) While 1 $Read = GUICtrlRead($btn1) $msg = GUIGetMsg() switch $msg Case $btnExit Exit Case $btn1 if $Read = "Start" Then GUICtrlSetData($label,"Go") GUICtrlSetData($btn1,"Stop") ElseIf $Read = "Stop" Then GUICtrlSetData($label,"Stop") GUICtrlSetData($btn1,"Start") EndIf Case -3 Exit EndSwitch WEnd An example for your help bro...
-
Waiting for in program process to finish
Starstar replied to imagine's topic in AutoIt General Help and Support
as you know .... ProcessWaitClose("ProcessName.exe") You can easily find process name from task manager process tab (Alt+Ctrl+del).There is no need of PID of you have process name. -
Starstar reacted to a post in a topic: GUI Designer: Koda 1.7.3.0
-
Starstar reacted to a file: AutoIt (Latest Stable Version)
-
automated Network adapter bridge setup
Starstar replied to powerbot's topic in AutoIt General Help and Support
A wild guess I think You can bridge the connection by RegWrite()..... But unfortunately i have no more clue for you.... -
Automatically launch executable when it exists
Starstar replied to S-Skelly's topic in AutoIt General Help and Support
#include <Array.au3> #include <File.au3> Global $defaultSeparator = Opt("GUIDataSeparatorChar", "|") Global $defaultSeparatorString = "<%Separator%>" Global $networkDirectory = @DesktopDir $sScriptName = @Compiled ? @ScriptName : StringRegExpReplace(@AutoItExe, ".+\\", "") While 1 ;Avoiding from double processing $aList = ProcessList($sScriptName) If $aList[0][0] = 1 Then ExitLoop For $i = 1 To $aList[0][0] If $aList[$i][1] <> @AutoItPID Then ProcessClose($aList[$i][1]) Next WEnd Local $aFileList = _FileListToArray($networkDirectory, "*exe",1) If @error = 1 Then MsgBox(0, "", "Path was invalid.") Exit EndIf If @error = 4 Then MsgBox(0, "", "No file(s) were found.") Exit EndIf _arrayToIni("Ntwrk.ini","EXE Files",$aFileList) ;Create a list of all files here desktop While 1 $aFileList = _FileListToArray($networkDirectory, "*exe",1) $oldlist = IniReadSection("Ntwrk.ini","EXE Files") If Not @error Then If ($oldlist[0][0]-1) > $aFileList[0] Then ;Incase delete reset EXE file list $aFileList = _FileListToArray($networkDirectory, "*exe",1) FileDelete(@desktopdir&"\Ntwrk.ini") _arrayToIni("Ntwrk.ini","EXE Files",$aFileList) EndIf If ($oldlist[0][0]-1) < $aFileList[0] Then $aFileList = _FileListToArray($networkDirectory, "*exe",1) $L = $aFileList[0] $find=_ArrayFindAll($oldlist,$aFileList[$L]) If @error = 6 Then $aFileList = _FileListToArray($networkDirectory, "*exe",1) $L = $aFileList[0] $ans = MsgBox(4,"Alert","New file is: "& $aFileList[$L] &" Do You Want Execute???") If $ans = 7 Then WinClose("Alert") ElseIf $ans = 6 Then $aFileList = _FileListToArray($networkDirectory, "*exe",1,True) $L = $aFileList[0] ShellExecute($aFileList[$L]) EndIf _arrayToIni("Ntwrk.ini","EXE Files",$aFileList) EndIf EndIf EndIf WEnd Func _arrayToIni($hFile, $sSection, $aName) ;;;BY Detefon Local $iLines = UBound($aName) Switch UBound($aName, 2) Case 0 Local $sTemp = "" For $ii = 0 To $iLines - 1 $aName[$ii] = StringReplace($aName[$ii], @LF, "At^LF") $sTemp &= $ii & "=" & $aName[$ii] & @LF Next IniWriteSection($hFile, $sSection, $sTemp, 0) Case Else Local $aTemp[1], $sString = "", $iColumns = UBound($aName, 2) For $ii = 0 To $iLines - 1 For $jj = 0 To $iColumns - 1 $aName[$ii][$jj] = StringReplace($aName[$ii][$jj], $defaultSeparator, $defaultSeparatorString) $sString &= $aName[$ii][$jj] & $defaultSeparator Next _ArrayAdd($aTemp, StringTrimRight($sString, 1)) $sString = "" Next _ArrayDelete($aTemp, 0) _arrayToIni($hFile, $sSection & "#" & $iColumns & "#" & $defaultSeparator & "#" & $defaultSeparatorString, $aTemp) EndSwitch EndFunc ;==>_arrayToIni Try this one -
Automatically launch executable when it exists
Starstar replied to S-Skelly's topic in AutoIt General Help and Support
Another way get file list like this get all files name using. _FileListToArray()and then save it as .INI and compare you new array with old saved INI file . edit::: you can use this function to convert array to ini or ini to array.