-
Posts
58 -
Joined
-
Last visited
Everything posted by mihaibr
-
_ReplaceStringInFile and multiline string
mihaibr replied to mihaibr's topic in AutoIt General Help and Support
Thanks again guinness! -
_ReplaceStringInFile and multiline string
mihaibr replied to mihaibr's topic in AutoIt General Help and Support
I don't know to write regular expressions . There are two other tags <date></date> and <user></user> . L.E.: Thanks mikell for that example, but there can be two poem with the same name but different authors . -
_ReplaceStringInFile and multiline string
mihaibr replied to mihaibr's topic in AutoIt General Help and Support
Wow, nice example, thanks again! -
_ReplaceStringInFile and multiline string
mihaibr replied to mihaibr's topic in AutoIt General Help and Support
Oh yea! Forgot about it (lol) ! Thanks guinness! -
_ReplaceStringInFile and multiline string
mihaibr replied to mihaibr's topic in AutoIt General Help and Support
Ok, I unrestand now. If i got this file: <poem> <name>poem1 name</name> <author>author1 name</author> <lyrics> line line line </lyrics> </poem> <poem> <name>poem2 name</name> <author>author2 name</author> <lyrics> line line line </lyrics> </poem> <poem> <name>poem3 name</name> <author>author3 name</author> <lyrics> line line line </lyrics> </poem> and all poems are stored in an array named $aPoems[] and I want to remove the poem that it's in $aPoems[2]: <poem> <name>poem3 name</name> <author>author3 name</author> <lyrics> line line line </lyrics> </poem> Which parameters should I use? (Which pattern) -
_ReplaceStringInFile and multiline string
mihaibr replied to mihaibr's topic in AutoIt General Help and Support
all the poems are stored in an array using StringRegExp(FileRead($hFile),'<(?i)POEM>(?s)(.*?)</(?i)POEM>',3) -
_ReplaceStringInFile and multiline string
mihaibr replied to mihaibr's topic in AutoIt General Help and Support
i don't know if you understand what I want I want to replace a section in the file: <poem> <name>poem3 name</name> <author>author3 name</author> <lyrics> line line line </lyrics> </poem> -
Hello, I'm working on a personal filetype parser. I'm using .poem files extension with a HTML-like syntax. An exemple file looks like this: <poem> <name>poem1 name</name> <author>author1 name</author> <lyrics> line line line </lyrics> </poem> <poem> <name>poem2 name</name> <author>author2 name</author> <lyrics> line line line </lyrics> </poem> <poem> <name>poem3 name</name> <author>author3 name</author> <lyrics> line line line </lyrics> </poem> I'm using this parser for a lyrics archive program. If the user want to delete a poem, I will use the _ReplaceStringInFile to delete the poem from the .poem file.
-
GUICtrlCreatePic is it compounding the images?
mihaibr replied to Phaser's topic in AutoIt General Help and Support
Create the Pic control in your gui. then use GUICtrlSetImage to set the image there Edit:Erm,Melba was faster xD -
Hey MsgBox, you came here to learn yourself, lol Function MsgBox got 5 parameters(First three are necessarily and the other two are optional) 1.The first one is the flag. Flag is the parameter that indicates the type of message box. You find all flag values here: http://www.autoitscript.com/autoit3/docs/functions/MsgBox.htm 2.The second one is the Title. It refears to the title of the message box. 3.The third is Text. It refears to the text of the message box. The other two are optional. They are Timeout and Hwnd 4.Timeout Timeout in seconds. After the timeout has elapsed the message box will be automatically closed. 5.Hwnd The window handle to use as the parent for this dialog.
-
How to upload file to my host with _winhttp
mihaibr replied to EmptySpace's topic in AutoIt General Help and Support
Why don't you use FTPEx functions? -
Another one who ask for help
mihaibr replied to Giorgio2012's topic in AutoIt General Help and Support
You should provide more informations. So, you got 10-20 values inside your script, and you want to compare them with other values retrived from some sites? -
Question about ControlSend() and printing a variable
mihaibr replied to mustin98's topic in AutoIt General Help and Support
Use Autoit Window Info tool or Also, you should read the Controls page. -
my app was working but stopped...?
mihaibr replied to RichE's topic in AutoIt General Help and Support
I think the $dirsize is the problem. Before you use it as array, check if it's an array using IsArray() If IsArray($dirsize) Then ;your code here Else MsgBox(0, "Error", "$dirsize is not an array") EndIf -
Simple Window Closing Madness
mihaibr replied to thepaulguy's topic in AutoIt General Help and Support
First, stop double posting, use the "Edit" button. I was talking about the button status. Can you post an screenshot of that application and the Error ?- 13 replies
-
- winclose
- winactivate
-
(and 1 more)
Tagged with:
-
Hi, Today I bought a new keyboard and at home I noticed that it doesn't have buttons for the volume control(VolumeUP,VolumeDOWN and MUTE), so I created this script: #include "SoundGetSetQuery.au3" Global $bState=False,$aIcon[4]=["low.ico","med.ico","max.ico","mute.ico"] $iVolume=_SoundGet(0, "dSpeakers", 1, "Volume") If $iVolume<=33 Then TraySetIcon($aIcon[0]) If $iVolume>33 And $iVolume<=66 Then TraySetIcon($aIcon[1]) If $iVolume>66 And $iVolume<=100 Then TraySetIcon($aIcon[2]) HotKeySet("{PGUP}","up");VolumeUP HotKeySet("{PGDN}","down");VolumeDOWN HotKeySet("{INS}","mute");VolumeMUTE Func up() If $bState==False Then $iVolume=_SoundGet(0, "dSpeakers", 1, "Volume") Send("{VOLUME_UP}") If $iVolume<=33 Then TraySetIcon($aIcon[0]) If $iVolume>33 And $iVolume<=66 Then TraySetIcon($aIcon[1]) If $iVolume>66 And $iVolume<=100 Then TraySetIcon($aIcon[2]) EndIf EndFunc Func down() If $bState==False Then $iVolume=_SoundGet(0, "dSpeakers", 1, "Volume") Send("{VOLUME_DOWN}") If $iVolume>=1 And $iVolume<=33 Then TraySetIcon($aIcon[0]) If $iVolume>33 And $iVolume<=66 Then TraySetIcon($aIcon[1]) If $iVolume>66 And $iVolume<=100 Then TraySetIcon($aIcon[2]) If $iVolume==0 Then TraySetIcon($aIcon[3]) EndIf EndFunc Func mute() If $bState==True Then $iVolume=_SoundGet(0, "dSpeakers", 1, "Volume") Send("{VOLUME_MUTE}") If $iVolume>=1 And $iVolume<=33 Then TraySetIcon($aIcon[0]) If $iVolume>33 And $iVolume<=66 Then TraySetIcon($aIcon[1]) If $iVolume>66 And $iVolume<=100 Then TraySetIcon($aIcon[2]) If $iVolume==0 Then TraySetIcon($aIcon[3]) $bState=False Else Send("{VOLUME_MUTE}") TraySetIcon($aIcon[3]) $bState=True EndIf EndFunc While True Sleep(10) WEndHere you can find out the script with the original indentation: http://pastebin.com/cCerHina I attached the icon in this post. The include "SoundGetSetQuery.au3" can be found here: I chose the keys "PGUP","PGDN" and "INS" because I use them rare. I extracted the icons from this iconset: http://www.iconarchive.com/show/oxygen-icons-by-oxygen-icons.org.1.html icons.7z
-
Simple Window Closing Madness
mihaibr replied to thepaulguy's topic in AutoIt General Help and Support
Are you sure that the button status is Active? Maybe that application got some kind of protection.- 13 replies
-
- winclose
- winactivate
-
(and 1 more)
Tagged with:
-
Simple Window Closing Madness
mihaibr replied to thepaulguy's topic in AutoIt General Help and Support
Yes, MouseClick() (as the last method) There might be other method, ControlClick() ,maybe?- 13 replies
-
- winclose
- winactivate
-
(and 1 more)
Tagged with:
-
Simple Window Closing Madness
mihaibr replied to thepaulguy's topic in AutoIt General Help and Support
Are you sure that the handle is ok? look at WinTitleMatchMode Can you take a picture of that "Error"? if is MsgBox(0, "","ネットワークに接続できません。" why dont you send "Enter" ? (or press the OK button) If that windows have the same handle everytime why don't you use WinClose(the handle value) ?- 13 replies
-
- winclose
- winactivate
-
(and 1 more)
Tagged with:
-
Function inside a While statement
mihaibr replied to xboi209's topic in AutoIt General Help and Support
Ok guys! Sorry about that,I was trying to help him but I was in a rush. @xboi209 can you post the full code? -
Function inside a While statement
mihaibr replied to xboi209's topic in AutoIt General Help and Support
@Jos, the reason why I did'n post any comment is that I was hurrying. I was thinking that, in this case, will be good to add a Sleep there. The "IF change" do the same thing, but if he got just one expression in the "IF" is ok to write it like that, is easier. -
Function inside a While statement
mihaibr replied to xboi209's topic in AutoIt General Help and Support
Func somefunction() If $variable = 1 Then MsgBox(0, "", "message") EndFunc While $Process > 1 somefunction() Sleep(10) WEnd -
code inside here
-
Set 2 different background colors in 1 GUI
mihaibr replied to lrstndm's topic in AutoIt GUI Help and Support
you can do this using labels too $Form1 = GUICreate("Form1", 600, 400) $Label1 = GUICtrlCreateLabel("", 0, 0, 300, 400) GUICtrlSetBkColor(-1, 0x00FF00) $Label2 = GUICtrlCreateLabel("", 300, 0, 300, 400) GUICtrlSetBkColor(-1, 0xFFFF00) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3;$GUI_EVENT_CLOSE Exit EndSwitch Sleep(10) WEnd