-
Posts
12 -
Joined
-
Last visited
About Thamiel
- Birthday 05/12/1964
Profile Information
-
Interests
Coding, Computers, Networking, Gaming
Thamiel's Achievements
Seeker (1/7)
0
Reputation
-
Finding a text between 2 markers
Thamiel replied to Dryden's topic in AutoIt General Help and Support
I couldn't find the post that I first found the following snippet wrote by someone else and I take no credit for it, but it works great for what your after To use it $str = "# 010 #Your String of course# 101 #", $start = '# 010 #', $end = '# 101 #' ; A Modified String < Between > Search ------------------------------------------------------ Global $pos Func stringbetween($str, $start, $end) $pos = StringInStr($str, $start) If Not @error Then $str = StringTrimLeft($str, $pos + StringLen($start) - 1) $pos = StringInStr($str, $end) If Not @error Then $str = StringTrimRight($str, StringLen($str) - $pos + 1) Return $str EndIf EndIf EndFunc ;==>stringbetween -
If singleton isn't doing what you want/need then Click Here this maybe what your after
-
Combobox item list confusion
Thamiel replied to fred666777's topic in AutoIt General Help and Support
From the help file, did change _GUICtrlComboBox_AddDir($hCombo, @WindowsDir & "\*.exe") to _GUICtrlComboBox_AddDir($hCombo, @WindowsDir & "\*.ini") #AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include <GUIComboBox.au3> #include <GuiConstantsEx.au3> #include <Constants.au3> Opt('MustDeclareVars', 1) $Debug_CB = False ; Check ClassName being passed to ComboBox/ComboBoxEx functions, set to True and use a handle to another control to see it work _Main() Func _Main() Local $hCombo ; Create GUI GUICreate("ComboBox Add Dir", 400, 296) $hCombo = GUICtrlCreateCombo("", 2, 2, 396, 296) GUISetState() ; Add files _GUICtrlComboBox_BeginUpdate($hCombo) _GUICtrlComboBox_AddDir($hCombo, @WindowsDir & "\*.ini") _GUICtrlComboBox_EndUpdate($hCombo) ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>_Main -
Is it possible to pull data from a drop down box?
Thamiel replied to PieMan's topic in AutoIt General Help and Support
Here's a snippet from a program I've been working on, the Function delete's an entry from a ComboBox, after which it delete's the old ini file, then sorts the ComboBox entries, removes any dupes and lastly writes the remaining ComboBox entries back out to an ini file. Func Del() _GUICtrlComboBox_DeleteString($PickIt, _GUICtrlComboBox_FindStringExact($PickIt, ControlGetText('', '', '[CLASS:Edit; INSTANCE:2]'), -1)) If FileExists($ST_INI) Then FileDelete($ST_INI) $aList = _GUICtrlComboBox_GetListArray($PickIt) _ArraySort($aList) _ArrayRemoveDuplicates($aList) $file = FileOpen($ST_INI, 1) For $x = 1 To $aList[0] FileWriteLine($file, $aList[$x]) Next FileClose($file) EndFunc ;==>Del -
Just a bit of a tweak gets you $Link = InputBox('YouTube Age Bypass.' , 'Bypass YouTube Age Checker.' , ClipGet() , ' M' , 250 , 30) If StringInStr($Link, 'http://www.youtube.com/watch?v=') <> 0 Then $FixedLink = StringReplace($Link, 'http://www.youtube.com/watch?v=', 'http://www.youtube.com/watch/v/') Else $FixedLink = 'http://www.youtube.com/watch/v/' & StringRight($Link, 11) EndIf ShellExecute($FixedLink) Of course for most it seems no matter what the link after you've clicked it ends up being, when right click and choose to copy link it is always in the format 'http://www.youtube.com/watch?v='
-
This little bit of code was made because I needed a way to change values in the memory space of a running program on the fly with different values. and as such I just made my own tool for it with AutoIt and here is the result of that endeavor, any comments on ways to do any of it better welcomed #cs Memory_Editor.au3 - It's not fancy and may not be the best way to do it, but it does what I needed it for ;-) #ce #Include <NomadMemory.au3> #include <string.au3> $i = 1 While $i = 1 $Do_It = MsgBox(262148, "Do You Wish To Edit A Program's Memory Space ?", _ "Do You Wish To Continue [Yes / No] ?" & @LF & "Also You Can Enter x At Anytime To Exit") If $Do_It = 6 Then _Edit() If $Do_It = 7 Then Exit WEnd Func _Edit() $File = InputBox("Process to use", "Enter Process Name From Taskman", "" , " M", 75, 20, -1, -1) If $File = 'x' Then Exit $Addy = "0x" & InputBox("Address to use", "Enter Start Address [Hex]", "", " M", 75, 130, -1, -1) If $Addy = 'x' Then Exit $Type = InputBox("Data Type", "Enter 1 for Text" & @lf & "Enter 2 for Hex", "", " M", 75, 130, -1, -1) If $Type = 'x' Then Exit If $Type = '1' Then $Text = InputBox("New Data", "Enter Text String", "", " M", 600, 130, @DesktopWidth/4, -1) $Data = "0x" & _StringToHex($Text) ElseIf $Type = "2" Then $Data = "0x" & InputBox("New Data", "Enter Hex Data", "", " M", 600, 130, @DesktopWidth/4, -1) Else Exit EndIf $Proc = ProcessList($File) $ID = _MemoryOpen($Proc[1][1]) If @Error Then MsgBox(262144, "ERROR", "Failed to open memory") EndIf _MemoryWrite($Addy, $ID, $Data, 'byte[' & StringLen($Data)/2-1 & ']') _MemoryClose($ID) MsgBox(262144,"Confirmed", "Memory Edited") EndFunc
-
Sweet works great to solve an issue I had with multiple runs
-
Try the following if PG2 is already running in the systray( if not start it first ;-) ), it'll uncheck the 'Hide window on close' checkbox , then close it correctly next it'll restart PG2 and reset the check box back to normal (works if PG2 has been installed into it's default install directory) CODE ControlCommand("PeerGuardian 2", "", 1172, "UnCheck", "") WinClose("PeerGuardian 2", "") Sleep(1000) Run(@ProgramFilesDir&"\PeerGuardian2\pg2.exe") WinWaitActive("PeerGuardian 2","") ControlCommand("PeerGuardian 2", "", 1172, "Check", "") WinClose("PeerGuardian 2", "")
-
how do I click yahoo sign in button
Thamiel replied to jimmyjmmy's topic in AutoIt General Help and Support
Here an example made from bits of other examples, I have used it myself to make a few Login Proggies for different friends and family who at times have trouble remembering their login info. CODE#include <GUIConstantsEx.au3>#include <IE.au3> #include <WindowsConstants.au3> $width = "1024" $height = "768" _IEErrorHandlerRegister() $oIE = _IECreateEmbedded() GUICreate("Automated Yahoo Mail Logon", $width, $height, _ (@DesktopWidth - $width) / 2, (@DesktopHeight - $height) / 2, _ $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, $width, $height) GUISetState() _IENavigate($oIE, "https://login.yahoo.com/config/login_verify2?&.src=ym") $o_form = _IEFormGetObjByName($oIE, "login_form") $o_login = _IEFormElementGetObjByName($o_form, "login") $o_password = _IEFormElementGetObjByName($o_form, "passwd") $o_signin = _IEFormElementGetObjByName($o_form, ".save") $username = "UserName" $password = "PassWord" _IEFormElementSetValue($o_login, $username) _IEFormElementSetValue($o_password, $password) _IEAction($o_signin, "click") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete() Exit Based from this snippet ===> http://quadryders.com/phpcc/snippet.php?sid=92 CODE#include <IE.au3> $sUsername = "Your Username" $sPassword = "Your Password" $oIE = _IECreate("http://mail.yahoo.com") ; get pointers to the login form and username and password fields $oform = _IEFormGetObjByName($oIE, "login_form") $ologin = _IEFormElementGetObjByName($oform, "login") $opassword = _IEFormElementGetObjByName($oform, "passwd") ; Set field values and submit the form _IEFormElementSetValue($ologin, $sUsername) _IEFormElementSetValue($opassword, $sPassword) _IEFormSubmit($oform) -
I got to goofing with some code another user asked for help with and thought others might like to play with it, the idea hit while thinking of my grandmother she likes to chat but hates trying to remember/look for her password You'll need to use a 'real' nick & password of course before using #include <IE.au3> $oIE = _IECreate ("https://login.yahoo.com/config/login_verify2?.src=wmsgr&.intl=us&.pd=c%3DB_VH9oa42e68KuzJEhSlKbE-&.done=http://webmessenger.yahoo.com/close.php?r=1968165161") $o_form = _IEFormGetObjByName ($oIE, "login_form") $o_login = _IEFormElementGetObjByName ($o_form, "login") $o_password = _IEFormElementGetObjByName ($o_form, "passwd") $o_signin = _IEFormElementGetObjByName ($o_form, ".save") $username = "user_name" $password = "12345" _IEFormElementSetValue ($o_login, $username) _IEFormElementSetValue ($o_password, $password) _IEAction ($o_signin, "click")
-
Opps forgot to say, "you don't need the @yahoo.com" $username = "123@yahoo.com" becomes just $username = "123"
-
Here you go #include <IE.au3> $oIE = _IECreate ("http://mail.yahoo.com") $o_form = _IEFormGetObjByName ($oIE, "login_form") $o_login = _IEFormElementGetObjByName ($o_form, "login") $o_password = _IEFormElementGetObjByName ($o_form, "passwd") $o_signin = _IEFormElementGetObjByName ($o_form, ".save") $username = "123@yahoo.com" $password = "..." _IEFormElementSetValue ($o_login, $username) _IEFormElementSetValue ($o_password, $password) _IEAction ($o_signin, "click") _______________________________________________________________ If I was you tho I'd change my password Welcome, Astro! You have 95 unread messages: