Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/04/2013 in all areas

  1. With the spirit of Regex ;Im assuming the chars required are digits if not use . in place of \d #include <Array.au3> $String = "8598437769,h1234567" & @CRLF & _ "1339236010,h1234567" & @CRLF & _ "157412635,h1234567" & @CRLF & _ "2310790863,h1234567" & @CRLF & _ "1768878978,h1234567" & @CRLF & _ "1050122245,h1234567" & @CRLF & _ "2867246473,lPX3hR1" & @CRLF & _ "2310790863,h1234567" & @CRLF & _ "1768878978,h1234567" & @CRLF & _ "1050122245,h1234567" & @CRLF & _ "2867246473,lPX3hR1" & @CRLF & _ "2310790863,h1234567" & @CRLF & _ "1768878978,h1234567" & @CRLF & _ "1050122245,h1234567" & @CRLF & _ "2867246473,lPX3hR1" ;Make the Array $String = StringRegExp( $String, "\d+(?=,)", 3) If @error Then Exit -1 ;No Match $String = _ArrayUnique( $String ) _ArrayDelete( $String, 0 ) _ArrayDisplay( $String ) Hope this helps
    1 point
  2. you used [0-9]{6,12} as the pattern I dont know the condition and what are you trying to achieve What do these mean ?
    1 point
  3. ok thanks...no also the latest update will not fix it.. But i think i know whats the problem... i fix it and say it if the new update is aviable..
    1 point
  4. kylomas

    stringregexp

    Or simply (non-regexp) #include <array.au3> $s = 2.73 $a = Stringsplit($s, '',2) _arraydisplay($a) Quote from M23, "The thing about SRE's is knowing when to use them". kylomas
    1 point
  5. Xenobiologist

    stringregexp

    #include #include $s = 2.73 $a = StringRegExp($s, ".", 3) ConsoleWrite(@error & @CRLF) ConsoleWrite(_ArrayToString($a, '|') & @CRLF)
    1 point
  6. So I'm really sorry that I overlook this stupid bug! I have uploaded a new version of ISN to my website that will fix the problem with the au3 files and the language of the initial config assistent! (The update is also aviable via automatic update) If your miss the "creat new au3 file" in your new contextmenue...update ISN to the latest version, download and install the latest AutoIt and restart your computer (restart is very important!) (See posts above) Again sorry for my mistake and i hope you give ISN a second chance:)
    1 point
  7. Run this script in SciTE and go into sleep and return from sleep... you will see notifications in the console. #include <WindowsConstants.au3> #include <GUIConstants.au3> #include <date.au3> ;~ #define PBT_APMQUERYSUSPEND 0x0000 ;~ #define PBT_APMQUERYSTANDBY 0x0001 ;~ #define PBT_APMQUERYSUSPENDFAILED 0x0002 ;~ #define PBT_APMQUERYSTANDBYFAILED 0x0003 ;~ #define PBT_APMSUSPEND 0x0004 ;~ #define PBT_APMSTANDBY 0x0005 ;~ #define PBT_APMRESUMECRITICAL 0x0006 ;~ #define PBT_APMRESUMESUSPEND 0x0007 ;~ #define PBT_APMRESUMESTANDBY 0x0008 ;~ #define PBTF_APMRESUMEFROMFAILURE 0x00000001 ;~ #define PBT_APMBATTERYLOW 0x0009 ;~ #define PBT_APMPOWERSTATUSCHANGE 0x000A ;~ #define PBT_APMOEMEVENT 0x000B ;~ #define PBT_APMRESUMEAUTOMATIC 0x0012 Global $PBT_APMSUSPEND = 0x0004 Global $PBT_APMRESUMESUSPEND = 0x0007 Global $PBT_APMSTANDBY = 0x0005 Global $PBT_APMRESUMESTANDBY = 0x0008 $hGUI = GUICreate("Test", 100, 100,1,1) GUIRegisterMsg($WM_POWERBROADCAST, "Standby") GUIRegisterMsg($WM_QUERYENDSESSION, "Shutdown") ;~ GUISetState() While 1 Sleep(10) ;~ $GUIMsg = GUIGetMsg() ;~ Switch $GUIMsg ;~ Case $GUI_EVENT_CLOSE ;~ ExitLoop ;~ EndSwitch WEnd ; Exit ; Func Standby($hWnd, $Msg, $wParam, $lParam) ConsoleWrite(_NowTime() & ": " & $wParam & @LF) Select Case $wParam = $PBT_APMSUSPEND ConsoleWrite(" You going into Suspend." & @LF) Case $wParam = $PBT_APMRESUMESUSPEND ConsoleWrite(" You just woke up from Suspend." & @LF) Case $wParam = $PBT_APMRESUMESTANDBY ConsoleWrite(" You are going into Standby." & @LF) Case $wParam = $PBT_APMRESUMESTANDBY ConsoleWrite(" You just woke up from Standby." & @LF) ;MsgBox(0,"Hello Back", " You just woke up from Standby") Case Else EndSelect EndFunc Jos
    1 point
×
×
  • Create New...