Oder Java iText
Beiträge von Xenobiologist
-
-
Kann man das nicht über COM nutzen?
Edit: http://www.autoitscript.com/forum/topic/57…__1#entry499462 -
Hi zusammen,
es gibt ja Tools wie http://www.routercontrol.de/
Hat jemand sowas schon mal mit Autoit probiert?Mega
-
Bedingte Formatierung!
-
Sowas in der Art
Spoiler anzeigen
[autoit]#include <Excel.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <Array.au3>$column = "ServiceTag"
[/autoit] [autoit][/autoit] [autoit]
$targetColumn = 0
$sFilePath1 = @ScriptDir & "\Test2_inv.xls" ;This file should already exist
$oExcel = _ExcelBookOpen($sFilePath1)
If @error Then
MsgBox(0, "Error!", "Unable to Create the Excel Object")
Exit
EndIf$SheetList_A = _ExcelSheetList($oExcel)
[/autoit] [autoit][/autoit] [autoit]
For $y = 1 To UBound($SheetList_A) - 1
_ExcelSheetActivate($oExcel, $y)$aArray = _ExcelReadSheetToArray($oExcel)
[/autoit] [autoit][/autoit] [autoit]
If Not @error ThenFor $ii = 0 To $aArray[0][1]
[/autoit] [autoit][/autoit] [autoit]
If StringInStr($aArray[1][$ii], $column) <> 0 Then $targetColumn = $ii
Next
ConsoleWrite($aArray[0][0] & ' ' & $aArray[0][1] & @CRLF)
For $i = 0 To $aArray[0][0]
$aArray[$i][$targetColumn] = StringReplace(StringLower($aArray[$i][$targetColumn]), 'l', 'L')
Next
EndIf
_ExcelWriteSheetFromArray($oExcel, $aArray)
Next_ExcelBookSaveAs($oExcel, @ScriptDir & "\Test3_inv.xls", "xls", 0, 1) ; Now we save it into the temp
[/autoit]Mega
-
Sehr hübsch gemacht. allerdings sind auch ein paar Kleinigkeiten drin. Dim und Global. Eigentlich sollte man aus meinem Verständis mit Local arbeiten und möglichst auf Global verzichten, falls es geht.
-
Junx, entspannt euch.
Da steht Rätsel! Es ist keine wirkliche Scherzfrage, aber dennoch sollte klar sein, dass einfaches Rechnen nicht zum Ziel führt. Es sollte schon ein bißchen probiert werden.
Sorry, wenn ihr jetzt von einer mathematisch hoch wertvollen Aufgabe ausgegangen seid.
Mega -
Glückwunsch!!!
-
[autoit]
MsgBox(0,"Ergebnis", "Gesuchte Zahl = 107897" & @crlf & Floor(971078 / 9))
[/autoit]Ziel ist/war es schnell zu sein.
-
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Change2CUI=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** -
Hier meine Varianten, die ich probiert habe:
[autoit]For $i = 100000 To 999999
[/autoit]
;~ If Floor((StringRight($i, 2) & StringLeft($i, 4)) / 9) = $i Then ConsoleWrite($i & @CRLF)
If Floor((Mod($i, 100) & Floor($i / 100)) / 9) = $i Then ConsoleWrite($i & @CRLF)
;~ If Floor((StringRight($i, 2) & Floor($i/100)) / 9) = $i Then ConsoleWrite($i & @CRLF)
;~ If Floor(StringRegExpReplace($i, '(\d\d)(\d\d)(\d\d)', '\3\1\2') / 9) = $i Then ConsoleWrite($i & @CRLF)
;~ If $i = Floor(((Mod($i, 100) * 10000) + (($i - Mod($i, 100)) / 100)) / 9) Then ConsoleWrite('!' & $i & @CRLF)
NextMega
-
Hi,
wer von euch findet die schnellste Routine, um dieses Rätsel zu lösen?

- Es gibt eine 6-stellige Zahl
wenn man deren letzte 2 Ziffern hinten abschneidet
und vorne davor setzt
ergibt das genau das 9-fache der ursprünglichen Zahl
Wie lautet diese ursprüngliche 6-stellige Zahl ?
Okay, um Vergleichbarkeit herstellen zu können eine Prämisse. Es müssen alle 6-stelligen Zahlen gepürft werden!
Mega
- Es gibt eine 6-stellige Zahl
-
Hast du dies ausprobiert?
LinkEdit: Vergiss es, andere Baustelle

-
HI,
du hast also jede Menge x,y Koordinaten und diese sind werden der Reihe nach verbunden zu einer Fläche?
Und jetzt willst du wissen, ob ein Punkt innerhalb der Fläche liegt richtig?Gib mal ein paar Beispiele mit Koordinaten und Punkten und Ja/Nein.
Damit man die Fkt testen kann.Mega
-
Was heißt anpassen? Wie soll es genau aussehen?
-
HI,
hiermit kannst du es probieren. Zumindest alle Ordner auf Details oder so zu setzen sollte klappen.
Spoiler anzeigen
[autoit]#Region;**** Directives created by AutoIt3Wrapper_GUI ****
[/autoit] [autoit][/autoit] [autoit]#EndRegion;**** Directives created by AutoIt3Wrapper_GUI ****
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
$oWshShell = ObjCreate("WScript.Shell")
Const $conAllFolders = "HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags\AllFolders"
Const $ThumbView = "{8BEBB290-52D0-11D0-B7F4-00C04FD706EC}"
Const $TileView = "{65F125E5-7BE1-4810-BA9D-D271C8432CE3}"
Const $IconsView = "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
Const $ListView = "{0E1FA5E0-3573-11CF-AE69-08002B2E1262}"
Const $DetailsView = "{137E7700-3573-11CF-AE69-08002B2E1262}"
Const $FilmstripView = "{8EEFA624-D1E9-445B-94B7-74FBCE2EA11A}"
Global $sPrefix, $sPrefix1, $sPrefix2If $CMDLINE[0] = 1 Then
[/autoit] [autoit][/autoit] [autoit]If $CMDLINE[1] = "Thumbnails" Then
[/autoit] [autoit][/autoit] [autoit]
$VID_ID = $ThumbView
ElseIf $CMDLINE[1] = "Tiles" Then
$VID_ID = $TileView
ElseIf $CMDLINE[1] = "Icons" Then
$VID_ID = $IconsView
ElseIf $CMDLINE[1] = "List" Then
$VID_ID = $ListView
ElseIf $CMDLINE[1] = "Details" Then
$VID_ID = $DetailsView
ElseIf $CMDLINE[1] = "Filmstrip" Then
$VID_ID = $FilmstripView
EndIfRegDelete("HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\Bags")
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\BagMRU")
SetTinyOpen()
Sleep(1000)
Restore_normal_size()
Else
Exit 2
EndIfFunc SetTinyOpen()
[/autoit] [autoit][/autoit] [autoit]$object = ObjCreate("htmlfile")
[/autoit] [autoit][/autoit] [autoit]
With $object.ParentWindow.Screen
$sPrefix = "WinPos" & .width & "x" & .height & "(1)."
EndWith
$object = ObjCreate("htmlfile")
With $object.ParentWindow.Screen
$sPrefix1 = "MaxPos" & .width & "x" & .height & "(1)."
EndWith
With $object.ParentWindow.Screen
$sPrefix2 = "MinPos" & .width & "x" & .height & "(1)."
EndWith$oWshShell.RegWrite($conAllFolders & "\Shell\Address", 0xffffffff, "REG_DWORD")
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
$oWshShell.RegWrite($conAllFolders & "\Shell\Buttons", 0xffffffff, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\Col", 0xffffffff, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\FFlags", 1, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\FolderType", "MyDocuments", "REG_SZ")
$oWshShell.RegWrite($conAllFolders & "\Shell\HotKey", 0, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\Links", 0, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\" & $sPrefix1 & "x", 0xffffffff, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\" & $sPrefix1 & "y", 0xffffffff, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\" & $sPrefix2 & "x", 0xffffffff, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\" & $sPrefix2 & "y", 0xffffffff, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\Mode", 6, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\ShowCmd", 1, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\Sort", 0, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\SortDir", 1, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\Vid", $VID_ID, "REG_SZ")
$oWshShell.RegWrite($conAllFolders & "\Shell\WFlags", 0, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\" & $sPrefix & "bottom", 5, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\" & $sPrefix & "left", 0, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\" & $sPrefix & "right", 5, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\" & $sPrefix & "top", 0, "REG_DWORD")EndFunc ;==>SetTinyOpen
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]Func Restore_normal_size()
[/autoit] [autoit][/autoit] [autoit]$oWshShell.RegWrite($conAllFolders & "\Shell\" & $sPrefix & "bottom", 570, "REG_DWORD")
[/autoit] [autoit][/autoit] [autoit]
$oWshShell.RegWrite($conAllFolders & "\Shell\" & $sPrefix & "left", 0, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\" & $sPrefix & "right", 798, "REG_DWORD")
$oWshShell.RegWrite($conAllFolders & "\Shell\" & $sPrefix & "top", 2, "REG_DWORD")EndFunc ;==>Restore_normal_size
[/autoit]Mega
-
-
Kein problem, hatte ich irgendwo in der Sammlung

-
Spoiler anzeigen
[autoit]HotKeySet("{Esc}", "Quit")
[/autoit] [autoit][/autoit] [autoit]
While 1
Sleep(100)
If isScreensaverOn() Then
MsgBox(0, "", "It is on!")
Exit (0)
EndIf
WEndFunc isScreensaverOn()
[/autoit] [autoit][/autoit] [autoit]
; 1 = on , 0 = off
Local $list = ProcessList()
For $i = 1 To $list[0][0]
If StringInStr($list[$i][0], ".scr") Then Return 1
Next
Return 0
EndFunc ;==>isScreensaverOnFunc Quit()
[/autoit]
Exit
EndFunc ;==>QuitSpoiler anzeigen
[autoit]Global Const $DESKTOP_ENUMERATE = 0x40
[/autoit] [autoit][/autoit] [autoit]
Global Const $SPI_GETSCREENSAVERRUNNING = 114
Global Const $DESKTOP_SWITCHDESKTOP = 0x100HotKeySet("{ESC}", "_Terminate")
[/autoit] [autoit][/autoit] [autoit]
AdlibRegister("IsDeskTopLocked", 500)While 1
[/autoit] [autoit][/autoit] [autoit]
Sleep(10)
WEndFunc IsDeskTopLocked()
[/autoit] [autoit][/autoit] [autoit]
Local $p_lngHwnd, $p_lngRtn, $p_lngErr, $p_lngScreenSaver, $p_blnIsScreenSaver;~ ' ------------------------------------------
[/autoit] [autoit][/autoit] [autoit]
;~ ' First check for screen saver one of 2 ways,
;~ ' based of OS
;~ ' ------------------------------------------
If @OSTYPE = "WIN32_WINDOWS" Then
;~ ' ---------------------------------------
;~ ' Pre W2K -- Note, will only be TRUE if
;~ ' the "Password Protected" box is
;~ ' checked.
;~ ' ---------------------------------------
$p_lngHwnd = DllCall("user32.dll", "int", "OpenDesktopA", "str", "screen-saver", "int", 0, "int", False, "int", $DESKTOP_ENUMERATE)
If $p_lngHwnd[0] <> 0 Then
$p_blnIsScreenSaver = True
Else
$p_blnIsScreenSaver = False
EndIf
Else
;~ ' ---------------------------------------
;~ ' W2K+ -- Will determine if screen saver
;~ ' is running whether or not the
;~ ' "Password Protected" box is checked
;~ ' ---------------------------------------
$p_lngRtn = DllCall("user32.dll", "int", "SystemParametersInfoA", "int", $SPI_GETSCREENSAVERRUNNING, "int", 0, "int", $p_lngScreenSaver, "int", 0)
If $p_lngRtn[0] = 0 Then
ConsoleWrite("+>Error detecting screen saver" & @LF)
Else
$p_blnIsScreenSaver = $p_lngScreenSaver
EndIfEndIf
[/autoit] [autoit][/autoit] [autoit];~ ' ------------------------------------------
[/autoit] [autoit][/autoit] [autoit]
;~ ' If screen saver is *not* running, then
;~ ' check for locked workstation
;~ ' ------------------------------------------
If $p_blnIsScreenSaver Then
If @OSTYPE = "WIN32_WINDOWS" Then
ConsoleWrite("Screen saver is running..., Handle #" & $p_lngHwnd[0] & @LF)
$p_lngHwnd = DllCall("user32.dll", "int", "CloseDesktop", "int", $p_lngHwnd[0])
Else
ConsoleWrite("Screen saver is running on W2K+" & @LF)
EndIfElse
[/autoit] [autoit][/autoit] [autoit]
$p_lngHwnd = DllCall("user32.dll", "int", "OpenDesktopA", "str", "Default", "int", 0, "int", False, "int", $DESKTOP_SWITCHDESKTOP)If $p_lngHwnd[0] = 0 Then
[/autoit] [autoit][/autoit] [autoit]
ConsoleWrite("Error with OpenDesktop" & @LF)Else
[/autoit] [autoit][/autoit] [autoit]
$p_lngRtn = DllCall("user32.dll", "int", "SwitchDesktop", "int", $p_lngHwnd[0])
$p_lngErr = _GetLastErrorMessage()If $p_lngRtn[0] = 0 Then
[/autoit] [autoit][/autoit] [autoit]
If $p_lngErr = 0 Then
ConsoleWrite("! Desktop is locked" & @LF)
Else
ConsoleWrite("Error with SwitchDesktop" & @LF)
EndIf
Else
ConsoleWrite("Not locked!" & @LF)
EndIf$p_lngHwnd = DllCall("user32.dll", "int", "CloseDesktop", "int", $p_lngHwnd[0])
[/autoit] [autoit][/autoit] [autoit]EndIf
[/autoit] [autoit][/autoit] [autoit]
EndIf
EndFunc ;==>IsDeskTopLockedFunc _Terminate()
[/autoit] [autoit][/autoit] [autoit]
Exit
EndFunc ;==>_Terminate;===============================================
[/autoit] [autoit][/autoit] [autoit]
; _GetLastErrorMessage($DisplayMsgBox="")
; Format the last windows error as a string and return it
; if $DisplayMsgBox <> "" Then it will display a message box w/ the error
; Return Window's error as a string
;===============================================
Func _GetLastErrorMessage($DisplayMsgBox = "")
Local $ret, $s
Local $p = DllStructCreate("char[4096]")
Local Const $FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000If @error Then Return ""
[/autoit] [autoit][/autoit] [autoit]$ret = DllCall("Kernel32.dll", "int", "GetLastError")
[/autoit] [autoit][/autoit] [autoit]$ret = DllCall("kernel32.dll", "int", "FormatMessage", _
[/autoit]
"int", $FORMAT_MESSAGE_FROM_SYSTEM, _
"ptr", 0, _
"int", $ret[0], _
"int", 0, _
"ptr", DllStructGetPtr($p), _
"int", 4096, _
"ptr", 0)
$s = DllStructGetData($p, 1)
If $DisplayMsgBox <> "" Then MsgBox(0, "_GetLastErrorMessage", $DisplayMsgBox & @CRLF & $s)
Return $s
EndFunc ;==>_GetLastErrorMessage -