Código (dos) [Seleccionar]
@Echo OFF
:chck_size
if "%~z0" EQU "%VariableSize%" () ELSE ()
Pause&Exit
Saludos
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú@Echo OFF
:chck_size
if "%~z0" EQU "%VariableSize%" () ELSE ()
Pause&Exit
#Region " String To Case Function "
' [ String To Case Function ]
'
' // By Elektro H@cker
'
' Examples :
'
' MsgBox(String_To_Case("ThiS is A TeST", StringCase.Lower))
' MsgBox(String_To_Case("ThiS is A TeST", StringCase.Upper))
' MsgBox(String_To_Case("ThiS is A TeST", StringCase.Word))
' MsgBox(String_To_Case("ThiS is A TeST", StringCase.Title))
' MsgBox(String_To_Case("ThiS is A TeST", StringCase.Title, True))
Enum StringCase
Lower
Upper
Title
Word
End Enum
Public Function String_To_Case(ByVal Input_String As String, ByVal StringCase As StringCase, Optional ByVal Reverse As Boolean = False) As String
If Not Input_String = Nothing And Not Input_String = "" Then
Dim Output_String As String = Nothing
Select Case StringCase
Case StringCase.Lower : Output_String = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToLower(Input_String)
Case StringCase.Upper : Output_String = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToUpper(Input_String)
Case StringCase.Title : Output_String = Char.ToUpper(Input_String(0)) + StrConv(Input_String.Substring(1), VbStrConv.Lowercase)
Case StringCase.Word : Output_String = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(Input_String)
End Select
If Reverse Then Return Microsoft.VisualBasic.StrReverse(Output_String) Else Return Output_String
Else : Return False ' Any string to convert
End If
End Function
#End Region
' MsgBox(Get_Directory_Size(New IO.DirectoryInfo("C:\_"), True))
Private Function Get_Directory_Size(Dir_Info As IO.DirectoryInfo, Include_Subfolders As Boolean) As Long
Dim Dir_Total_Size As Long = Dir_Info.EnumerateFiles().Sum(Function(file) file.Length)
If Include_Subfolders Then Dir_Total_Size += Dir_Info.EnumerateDirectories().Sum(Function(dir) Get_Directory_Size(dir, True))
Return Dir_Total_Size
End Function
Attributes.Select(Function(a) DirectCast(a, Integer)).Sum()
32 + 64
#Region " Change File Attributes Function "
' [ Change File Attributes Function ]
'
' // By Elektro H@cker
'
' Examples :
' Change_File_Attributes("C:\File.txt", H + R)
' Change_File_Attributes("C:\File.txt", Hidden + Read_Only)
Const Archive As Integer = 32, A As Integer = 32
Const Directory As Integer = 16, D As Integer = 16
Const Hidden As Integer = 2, H As Integer = 2
Const Normal As Integer = 0, N As Integer = 0
Const Read_Only As Integer = 1, R As Integer = 1
Const System As Integer = 4, S As Integer = 4
Const Volume As Integer = 8, V As Integer = 8
Private Function Change_File_Attributes(ByVal File As String, ByVal Attributes As System.IO.FileAttributes) As Boolean
If IO.File.Exists(File) Then
Try
FileSystem.SetAttr(File, Attributes)
Return True ' File was modified OK
Catch
Return False ' File can't be modified maybe because User Permissions
End Try
Else
Return Nothing ' File doesn't exist
End If
End Function
#End Region
Dim folder As Scripting.FolderClass = fs.GetFolder(Environment.GetFolderPath(Environment.SpecialFolder.Personal))
MessageBox.Show(folder.Size)
Dim file As New FileStream(data_path & "notes.txt", FileMode.Open)
Dim text As String = Nothing
Dim reader As New StreamReader(file)
Dim writer As New StreamWriter(file)
While Not reader.EndOfStream
text = reader.ReadLine
If text.Contains(value) Then
text.Replace(value, "")
writer.Write(text)
End If
End While
file.Close()
CitarTo remove item from text file, first move all text to a list and remove whichever item you want. Then write the text stored in the list into text file
List<string> quotelist=File.ReadAllLines(filename).ToList();
string firstItem= quotelist[0];
quotelist.RemoveAt(0);
File.WriteAllLines(filename, quotelist.ToArray());
return firstItem;
Set WshShell = WScript.CreateObject("WScript.Shell")
TimeOut = 5000 ' En MiliSegundos
While TimeOut = TimeOut
WScript.Sleep(TimeOut)
WshShell.SendKeys "{F1}"
Wend