
Tec
Active Members-
Posts
87 -
Joined
-
Last visited
Everything posted by Tec
-
Big thx for help M23 This help me alot
-
Hi, how can I create a Gui label like this: NO3 or PO4 or FeSO4 x 1H2O Is there a way too use different fontsize with one lable ? I can use different label with different fontsize but its a little bit stupid. Thx for help
-
#Include <GuiConstantsEx.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) HotKeySet("{F1}", "function1") HotKeySet("{F2}", "function2") HotKeySet("{F3}", "function3") HotKeySet("{F4}", "function4") $Form1_1 = GUICreate("Form1", 993, 701, 192, 114) GUISetOnEvent($GUI_EVENT_CLOSE, "function4") $filemenu = GUICtrlCreateMenu("&Menu") $MenuItem1 = GUICtrlCreateMenuItem("&About", $filemenu) GUICtrlSetOnEvent($MenuItem1, "function1") $MenuItem2 = GUICtrlCreateMenuItem("&Info", $filemenu) GUICtrlSetOnEvent($MenuItem2, "function2") $MenuItem3 = GUICtrlCreateMenuItem("&Help", $filemenu) GUICtrlSetOnEvent($MenuItem3, "function3") $MenuItem4 = GUICtrlCreateMenuItem("&Exit", $filemenu) GUICtrlSetOnEvent($MenuItem4, "function4") GUISetState(@SW_SHOW) While 1 Sleep( 100 ) WEnd Func function1() MsgBox(0, "test", "hello 1") EndFunc Func function2() MsgBox(0, "test", "hello 2") EndFunc Func function3() MsgBox(0, "test", "hello 3") EndFunc Func function4() Exit EndFunc
-
Hi I found mein problem.... $LVS_EX_FULLROWSELECT Without $LVS_EX_FULLROWSELECT I have no Problem with the Gui. With $LVS_EX_FULLROWSELECT I have a greyed Listview after lock System (Ctrl+Alt+Del) but only if I use Listview with Tabs. Without Tabs it works fine. <- Without FULLROWSELECT after lock System (Ctrl+Alt+Del) <- With FULLROWSELECT after lock System (Ctrl+Alt+Del) #NoTrayIcon #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> Local $Gui = GUICreate("Test", 300, 200) Local $tab = GUICtrlCreateTab(5, 5, 290, 190) Local $tab1 = GUICtrlCreateTabItem("Tab1") Local $hListView = GUICtrlCreateListView("Test1 | Test2| Test3|", 10, 30, 280 , 160, -1, BitOR( $WS_EX_CLIENTEDGE, $LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES)) ;Problem ;Local $hListView = GUICtrlCreateListView("Test1 | Test2| Test3|", 10, 30, 280 , 160, -1, BitOR( $WS_EX_CLIENTEDGE, $LVS_EX_GRIDLINES)) ; no Problem Local $tab2 = GUICtrlCreateTabItem("Tab2") GUISetState(@SW_SHOW) ;GUICtrlCreateListViewItem("a|b|c", $hListView) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch Sleep(10) WEnd Exit Have someone a solution for me or can test the code ? I need $LVS_EX_FULLROWSELECT...
-
Example with Buttons. Hope this help you. #include <GUIConstantsEx.au3> $x = 0 Dim $Button[6] $Gui = GUICreate("Test", 125, 34 ) $Btn_Start = GUICtrlCreateDummy() For $i = 1 To 5 $x = ($i - 1) * 25 $Button[$i] = GUICtrlCreateButton($i, $x, 5, 24, 24) Next $Btn_End = GUICtrlCreateDummy() GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit Case $Btn_Start To $Btn_End For $i = 1 To UBound($Button) - 1 If $Msg == $Button[$i] Then MsgBox(0, "test", "Button: " & $Button[$i]) EndIf Next EndSwitch Sleep( 10) WEnd
-
#NoTrayIcon #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Local $Gui = GUICreate("Test", 300, 200) Local $tab = GUICtrlCreateTab(5, 5, 290, 190) Local $tab1 = GUICtrlCreateTabItem("Tab1") Local $hListView = GUICtrlCreateListView("Test1 | Test2| Test3", 10, 30, 280 , 160) Local $tab2 = GUICtrlCreateTabItem("Tab2") GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch Sleep(10) WEnd Exit With this small code I have the same problem with one difference. I need to lock (Ctrl+Alt+Del) my system two times befor the Listview is gray.
-
Hmm I test it on 2 WinXP SP3 Clients and a virtual Vista maschine. Always the same problem. If I start the test code above it looks good. If I press Ctrl+Alt+Del and go back the Scrollbar and some empty area from the listview are gray. If I minimize the Gui or scroll or change a Tab it is Ok... strange :-/ If I test the same code without GUICtrlCreateTab no problem with Ctrl+Alt+Del. But thx for testing jaberwocky6669
-
The first picture is after I lock/unlock my Computer. If I minimize and maximize the Gui or after first start it is ok (pic2). I have the Problem only with Tabs. Without Tabs I have no problem with Listview and lock/unlock. After lock/unlock an click on Scrollbar you can see the Scrollbar. See Screenshot.
-
Hi I have some Problem with Tab and Listview. When I lock my Workstation WinXP SP3 and unlock, the Scrollbar not refresh. See Screenshot. Autoit Version 3.3.6.1 #include <GuiListView.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) $Gui = GUICreate("Test", 300, 200) GUISetOnEvent($GUI_EVENT_CLOSE, "Beenden") Local $menu1 = GUICtrlCreateMenu("&Datei",-1,2) Local $menu10 = GUICtrlCreateMenuItem("Aktualisiere Client",$menu1) Local $menu11 = GUICtrlCreateMenuItem("Aktualisiere AD",$menu1) Local $menu12 = GUICtrlCreateMenuItem("Exit",$menu1) Local $tab = GUICtrlCreateTab(5, 0, 290, 180) Local $tab1 = GUICtrlCreateTabItem("Online") Local $hListView = GUICtrlCreateListView("Client | Status| test", 10, 25, 150, 150) ;GUICtrlSendMsg($hListView, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") Global $B_DESCENDING[_GUICtrlListView_GetColumnCount($hListView)] GUISetState() _test() While 1 Sleep(10) WEnd Exit Func Beenden() Exit EndFunc Func _test() _GUICtrlListView_DeleteAllItems($hListView) GUICtrlSetState($hListView, $GUI_DISABLE) Sleep( 3000 ) GUISetState(@SW_LOCK) For $a = 1 To 60 If $a = 4 Then GUICtrlCreateListViewItem("PC" & $a & "|Offline|" & $a, $hListView) Else GUICtrlCreateListViewItem("PC" & $a & "|Online|" & $a, $hListView) EndIf Sleep( 50 ) Next _GUICtrlListView_SetColumnWidth($hListView, 0, $LVSCW_AUTOSIZE) _GUICtrlListView_SetColumnWidth($hListView, 1, $LVSCW_AUTOSIZE) _GUICtrlListView_SetColumnWidth($hListView, 2, $LVSCW_AUTOSIZE) GUISetState(@SW_UNLOCK) GUICtrlSetState($hListView, $GUI_ENABLE) _ReduceMemory(@AutoItPid) EndFunc Func _ReduceMemory($i_PID = -1) If $i_PID <> -1 Then Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $i_PID) Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle[0]) DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle[0]) Else Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1) EndIf Return $ai_Return[0] EndFunc;==> _ReduceMemory() Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView $hWndListView = $hListView If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView) $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $LVN_COLUMNCLICK Local $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) _GUICtrlListView_SimpleSort($hWndListView, $B_DESCENDING, DllStructGetData($tInfo, "SubItem")) Case $NM_CUSTOMDRAW ; http://msdn.microsoft.com/en-us/library/bb761817(VS.85).aspx Local $tCustDraw = DllStructCreate($tagNMLVCUSTOMDRAW, $ilParam) Local $iDrawStage = DllStructGetData($tCustDraw, "dwDrawStage") Switch $iDrawStage Case $CDDS_PREPAINT Return $CDRF_NOTIFYITEMDRAW ;request custom drawing of items Case $CDDS_ITEMPREPAINT Return $CDRF_NOTIFYSUBITEMDRAW Case Else ;case $CDDS_SUBITEM Local $iItem = DllStructGetData($tCustDraw, "dwItemSpec") Switch DllStructGetData($tCustDraw, "iSubItem") Case 1 If _GUICtrlListView_GetItemText($hWndListView, $iItem, 1) = "Offline" Then DllStructSetData($tCustDraw, "clrTextBk", 0x0000FF) Else DllStructSetData($tCustDraw, "clrTextBk", 0xffffff) EndIf Case Else DllStructSetData($tCustDraw, "clrTextBk", 0xffffff) EndSwitch Return $CDRF_NEWFONT EndSwitch EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Did I do something wrong ?
-
ListView Sort and row Background Color
Tec replied to Tec's topic in AutoIt General Help and Support
thx again KaFu -
ListView Sort and row Background Color
Tec replied to Tec's topic in AutoIt General Help and Support
Good morning I change the code to highlight the complete row. But two more question I have. 1. Is the code modification the right way ? It works for me but I am a little bit confusion about the Return Values $CDRF_NEWFONT and $CDRF_NOTIFYSUBITEMDRAW 2. Is there a simple way to highlight only the "offline" cell ? thx for help #include <GuiListView.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Gui = GUICreate("Test", 300, 200) $hListView = GUICtrlCreateListView("Client | Status| test", 5, 0, 290, 250) GUICtrlSendMsg($hListView, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES) For $a = 1 To 10 If $a = 4 Then GUICtrlCreateListViewItem("PC" & $a & "|Offline|" & $a, $hListView) Else GUICtrlCreateListViewItem("PC" & $a & "|Online|" & $a, $hListView) EndIf Next GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") GUISetState() Global $B_DESCENDING[_GUICtrlListView_GetColumnCount($hListView)] While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch Sleep(10) WEnd Exit Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView $hWndListView = $hListView If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView) $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $LVN_COLUMNCLICK Local $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) _GUICtrlListView_SimpleSort($hWndListView, $B_DESCENDING, DllStructGetData($tInfo, "SubItem")) Case $NM_CUSTOMDRAW Local $tCustDraw = DllStructCreate($tagNMLVCUSTOMDRAW, $ilParam) Local $iDrawStage = DllStructGetData($tCustDraw, "dwDrawStage") Switch $iDrawStage Case $CDDS_PREPAINT Return $CDRF_NOTIFYITEMDRAW ;request custom drawing of items Case $CDDS_ITEMPREPAINT Local $iItem = DllStructGetData($tCustDraw, "dwItemSpec") If _GUICtrlListView_GetItemText($hWndListView, $iItem, 1) = "Offline" Then DllStructSetData($tCustDraw, "clrTextBk", 0x0000FF) EndIf Return $CDRF_NOTIFYSUBITEMDRAW ;request drawing each cell separately EndSwitch #cs Local $iItem = DllStructGetData($tCustDraw, "dwItemSpec") Local $iSubItem = DllStructGetData($tCustDraw, "iSubItem") ;Local $hDC = DllStructGetData($tCustDraw, 'hdc') If $iSubItem = 1 Then If _GUICtrlListView_GetItemText($hWndListView, $iItem, 1) = "Offline" Then ConsoleWrite(_GUICtrlListView_GetItemText($hWndListView, $iItem, 1) & @CRLF) DllStructSetData($tCustDraw, "clrTextBk", 0x0000FF) ; in BGR EndIf EndIf Return $CDRF_NEWFONT #ce EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY -
ListView Sort and row Background Color
Tec replied to Tec's topic in AutoIt General Help and Support
Big big thx Kafu That's help me alot -
Hi i need some help with Listview Sort and Background Color. Example: #include <GuiListView.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Gui = GUICreate("Test", 300, 200) $hListView = GUICtrlCreateListView("Client | Status", 5, 0, 290, 250) GUICtrlSendMsg($hListView, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES) For $a = 1 To 10 if $a = 4 then GUICtrlCreateListViewItem("PC" & $a & "| Offline", $hListView) GUICtrlSetBkColor(-1, 0xFF0000) else GUICtrlCreateListViewItem("PC" & $a & "| Online", $hListView) EndIf Next GUISetState() GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") Global $B_DESCENDING[_GUICtrlListView_GetColumnCount($hListView)] While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch Sleep( 10 ) WEnd Exit Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView $hWndListView = $hListView If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView) $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $LVN_COLUMNCLICK Local $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) _GUICtrlListView_SimpleSort($hWndListView, $B_DESCENDING, DllStructGetData($tInfo, "SubItem")) EndSwitch EndSwitch EndFunc I want to highlight all Offline clients. But how can I highlight the offline Clients if the order change? I read something about $NM_CUSTOMDRAW and read the post from Siao but i dont understand this. Need some small Example/help please.
-
How to install Windows from USB- WinSetupFromUSB Read RunOnceEx for applications install Search for silent install switch For net framework: http://www.msfn.org/board/topic/108344-net-framework-35-silent-installer/ Firefox : setup.exe /s start /wait setup.exe /S /C=%programfiles%\firefox Quicktime: msiexec /i Quicktime.msi /silent ...
-
Check this _Service_ UDF / Run your exe as Service ! Updated Using pure WinAPi, no external program
-
how to download multiple images from a website?
Tec replied to Shiro's topic in AutoIt General Help and Support
Test this small script Local $path = RegRead("HKLM\SOFTWARE\AutoIt v3\AutoIt", "InstallDir") ShellExecute("mk:@MSITStore:" & $path & "\UDFs3.chm::/html/libfunctions/_IECreate.htm") -
how to download multiple images from a website?
Tec replied to Shiro's topic in AutoIt General Help and Support
search the helpfile _IECreate and _IEQuit #include <IE.au3> _IECreate ( [$s_Url = "about:blank" [, $f_tryAttach = 0 [, $f_visible = 1 [, $f_wait = 1 [, $f_takeFocus = 1]]]]] ) _IEQuit ( ByRef $o_object ) -
Hi i search for a way to change the Logon Wallpaper without restart or a User is online. To change the Wallpaper i need to change the HKEY_USERS\.DEFAULT\Control Panel\Desktop\Wallpaper. But how refresh the screen if no User is login ? I play with _WinAPI_SystemParametersInfo but this seems only work if a User is online.
-
Hi I search for a way to block input at logon screen. BlockInput(1) only works if a User is sign on. One way i found is to change the registry key "start" from kbdclass and mouclass but this needs a reboot for enable and disable. I want to run a maintenance script (defrag, temp clean ... ) and blocked the Computer at this time and show a massage "blocked for maintenance". At the moment I have a script that copy and starts a second Script on remote Computer over SCHTASKS. Have someone a idea how to solve the blockinput problem without restart? mfg Tec
-
Here is some example Code for Tapi Call. Works for me with WinXP SP3 and Siemens Hipath and Tapi v170. Const $LINEADDRESSTYPE_PHONENUMBER = "&H1" Const $LINEMEDIAMODE_INTERACTIVEVOICE = "&H4" Const $TAPI3_ALL_TAPI_EVENTS = "&H1FFFF" Local $lAddressType = $LINEADDRESSTYPE_PHONENUMBER Local $txtAddressName = "LineName" ;Name of Line Local $Number = "123456" ; Number to call $objTapi = ObjCreate("TAPI.TAPI.1") $mapper = ObjCreate("DispatchMapper.DispatchMapper.1") $objTapi.Initialize $objTapi.EventFilter = $TAPI3_ALL_TAPI_EVENTS $objCollAddresses = $objTapi.Addresses For $lLoop = 1 To $objCollAddresses.Count $objCrtAddress = $objCollAddresses.Item($lLoop) If $objCrtAddress.AddressName = $txtAddressName Then $gobjAddress = $objCrtAddress $bolFoundLine = True ExitLoop EndIf Next If $bolFoundLine = True Then $TestCall = $gobjAddress.CreateCall($Number, $lAddressType, $LINEMEDIAMODE_INTERACTIVEVOICE) $TestCall.connect(False) EndIf
-
Found a solution. #NoTrayIcon #include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> GUIRegisterMsg($WM_NOTIFY, "WM_Notify_Events") Global $hGUI, $hListView, $hContextMenu, $Call, $hmsg $hGUI = GUICreate("Phonebook", 210, 300) GUISetIcon(@SystemDir & "\SHELL32.dll", 310, $hGUI) $hListView = GUICtrlCreateListView("Name |Number", 5, 5, 200, 290) GUICtrlSendMsg($hListView, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES) GUICtrlSendMsg($hListView, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_FULLROWSELECT, $LVS_EX_FULLROWSELECT) $HelpContext = GUICtrlCreateContextMenu($hListView) $HelpWWW = GUICtrlCreateMenuItem("Website", $HelpContext) For $a = 100 To 110 GUICtrlCreateListViewItem("Name" & $a & "|" & $a, $hListView) Next GUISetState() While 1 $hmsg = GUIGetMsg() Switch $hmsg Case $GUI_EVENT_CLOSE Exit Case $HelpWWW MsgBox(0,"","TEST") EndSwitch Sleep(50) WEnd Func WM_Notify_Events($hWndGUI, $MsgID, $wParam, $lParam) #forceref $hWndGUI, $MsgID, $wParam Local $tagNMHDR, $event, $hwndFrom, $code $tagNMHDR = DllStructCreate("int;int;int", $lParam) If @error Then Return $event = DllStructGetData($tagNMHDR, 3) Select Case $wParam = $hlistview Select Case $event = $NM_RCLICK $avSel = _GUICtrlListView_GetSelectedIndices($hListView, 1) If IsArray($avSel) And $avSel[0] > 0 Then $sItemTxt = _GUICtrlListView_GetItemText($hListView, $avSel[1], 1) $infoitem = GUICtrlSetData($HelpWWW, "Call " & $sItemTxt) EndIf EndSelect EndSelect $tagNMHDR = 0 $event = 0 $lParam = 0 EndFunc ;==>WM_Notify_Events
-
Hi I want to create a dynamic ContextMenu from ListView. But i dont find a solution here. Sample Code: #NoTrayIcon #include <GuiConstantsEx.au3> #include <GuiListView.au3> Opt("MustDeclareVars", 1) Global $hGUI, $hListView, $hContextMenu, $Call, $hmsg $hGUI = GUICreate("Phonebook", 210, 300) GUISetIcon(@SystemDir & "\SHELL32.dll", 310, $hGUI) $hListView = GUICtrlCreateListView("Name |Number", 5, 5, 200, 290) GUICtrlSendMsg($hListView, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES) GUICtrlSendMsg($hListView, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_FULLROWSELECT, $LVS_EX_FULLROWSELECT) $hContextMenu = GUICtrlCreateContextMenu($hListView) $Call = GUICtrlCreateMenuItem("Call", $hContextMenu) For $a = 100 To 110 GUICtrlCreateListViewItem("Name" & $a & "|" & $a, $hListView) Next GUISetState() While 1 $hmsg = GUIGetMsg() Switch $hmsg Case $GUI_EVENT_CLOSE Exit Case $Call _select() EndSwitch Sleep(50) WEnd Func _select() Local $avSel, $sItemTxt = "", $TestCall $avSel = _GUICtrlListView_GetSelectedIndices($hListView, 1) If IsArray($avSel) And $avSel[0] > 0 Then $sItemTxt = _GUICtrlListView_GetItemText($hListView, $avSel[1], 1) ConsoleWrite($sItemTxt & @CRLF) EndIf EndFunc ;==>_select On right click I want to create a Context Menu with the option Call <Number> in the row from the second column where I click (Call 108 or Call 106 ...). I think I need to create the context menu dynamic on right click but dont know how. Have someone a example code for this ?
-
I found this in my archiv ;-) ; Smoother Mouse Move ; by the DtTvB ; Ease in function func __calci1($i, $sm) return $i ^ $sm; endFunc ; Ease out function func __calci2($i, $sm) return 1 - ((1 - $i) ^ $sm); endFunc ; Ease in out function func __calci($i, $sm) if ($i < 0.5) then return __calci1($i * 2, $sm) / 2; else return (__calci2(($i - 0.5) * 2, $sm) / 2) + 0.5; endIf endFunc ; Ease backward function func __calof($i, $sm) if ($i < 0.5) then return __calci($i * 2, $sm); else return __calci((1 - $i) * 2, $sm); endIf endfunc ; MAIN FUNCTION func mouseMove2($x2, $y2) $x1 = mouseGetPos(0); $y1 = mouseGetPos(1); $xv = random(-100, 100); $yv = random(-100, 100); $sm = random(1.5, 2.5); $m = random(50, 160); for $i = 0 to $m $ci = __calci($i / $m, $sm); $co = __calof($i / $m, $sm); $cx = $x1 + (($x2 - $x1) * $ci) + ($xv * $co); $cy = $y1 + (($y2 - $y1) * $ci) + ($yv * $co); mouseMove ($cx, $cy, 1); next endFunc ; Test Script mouseMove2 (512, 386); Edit: Here the post. mousemove2
-
You can use Rasphone to create a Phonebook file with settings without a new entry in network connections. Rasphone -? will help Example: ;create a test.ini with VPN Settings rasphone -f test.ini -a ;open the test.ini file with the name Test. For more settings like TCP/IP ... rasphone -f test.ini -e test With Rasdial you can use the phonebook file. Example: rasdail test USERNAME PASSWORD /Phonebook:test.ini Hope this help you.
-
Hi I have a prob with Website load and Animatewindow. I try to make a Website presentation. 2 Guis that load the website in background and then use AnimateWindows from user32.dll to fade in. But on the top i have a blank bar. Dont know how to fix this. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> #include <file.au3> GUIRegisterMsg($WM_ACTIVATEAPP, "_ToggleHotkeys") Dim $WERBUNG Local $I = 1, $COUNT, $activ = 1 $oIE1 = _IECreateEmbedded () $oIE2 = _IECreateEmbedded () Global $GUI1 = GUICreate("Test1", @DesktopWidth, @DesktopHeight+30, -1, -1, $WS_POPUP, $WS_EX_TOPMOST) $GUIActiveX1 = GUICtrlCreateObj($oIE1, 0, 30, @DesktopWidth+18, @DesktopHeight) Global $GUI2 = GUICreate("Test2", @DesktopWidth, @DesktopHeight+30, -1, -1, $WS_POPUP, $WS_EX_TOPMOST) $GUIActiveX2 = GUICtrlCreateObj($oIE2, 0, 30, @DesktopWidth+18, @DesktopHeight) GUISetState() _FILEREADTOARRAY(@ScriptDir & "\list.txt", $WERBUNG) $COUNT = $WERBUNG[0] _IENAVIGATE($OIE1, "about:blank") _IENAVIGATE($OIE2, "about:blank") $BEGIN = TimerInit() While 1 If TimerDiff($BEGIN) >= 5000 Then If $I > $COUNT Then $I = 1 IF $activ = 1 then _IENAVIGATE($oIE1, $WERBUNG[$I],1) WinActivate($gui1) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $GUI1, "int", 4000, "long", 0x00080000 ) ;WinSetState($GUI1, "", @SW_SHOW) WinSetState($GUI2, "", @SW_HIDE) ;DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $GUI2, "int", 3000, "long", 0x00090000 ) $activ = 0 else _IENAVIGATE($OIE2, $WERBUNG[$I],1) WinActivate($gui2) DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $GUI2, "int", 4000, "long", 0x00080000 ) ;WinSetState($GUI2, "", @SW_SHOW) WinSetState($GUI1, "", @SW_HIDE) ;DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $GUI1, "int", 3000, "long", 0x00090000 ) $activ = 1 EndIf $BEGIN = TimerInit() $I += 1 EndIf Sleep( 100 ) WEnd Func _ToggleHotkeys() If WinActive($GUI1) Or WinActivate($GUI2) Then HotKeySet("{Esc}","_Exit") Else HotKeySet("{Esc}") EndIf EndFunc Func _Exit() Exit EndFunclist.txt