Jump to content

Windows "Cover" - need companion


zwierzak
 Share

Recommended Posts

Hello, some time ago I worked on a project which was meant to be some kind of windows "cover". A combination of RocketDock(toolbar), a console(cmd) and many other things. I am looking for someone who would like to work with me on this project. I have just two demands: English or Polish - speaking and having an avarage or good knowledge of au3. I am tired of working alone and I have always wanted to work in a group, solving different issues :) Here is a preview of what I have so far. Feel free to message me or just post below :)

Console:

http://imageshack.us/f/210/screen2wog.png/

Toolbar:

http://imageshack.us/f/600/screen1be.png/

What is working:

Adding apps into toolbar(.exe and .lnk)

Deleting apps from toolbar

Autosaving options

Adding folders into toolbar(sometimes extracting icons doesn't work)

Showing/Hiding toolbar/console(ctrl + 1/2)

Effect glass on windows 7

Ohh I forgot to ask you for some suggestions. What would you like to see in this project that could improve the usage of Windows?

@EDIT

Here is the code, all the comments are most of them are in polish because i was writing it mainly for polish forum i am using and i didn't have time to translate that comments into english. Nevertheless, all the variables should be named in English.

#include <GUIConstantsEx.au3>
#include <GuiConstants.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>
#include <GuiListView.au3>
#include <WinAPI.au3>
#include <GuiRichEdit.au3>
#include <File.au3>
#include <Array.au3>
Opt("GUIOnEventMode", 1)
Opt("TrayOnEventMode", 1)
Opt("TrayMenuMode", 3)

HotKeySet("^2", "_show_hide_console")
HotKeySet("^1", "_hide_show_toolbar")
HotKeySet("^!{NUMPADADD}", "_volume_up")
HotKeySet("^!{NUMPADSUB}", "_volume_down")
HotKeySet("^!{NUMPADDIV}", "_volume_mute")


;Dane ikonek
Global $exeDir, $n = 0, $Start

;Dane okien
Global $stateTool = True ;ukryty/pokazany toolbar, gdzie True = pokazany
Global $stateConsole = False ;ukryta/pokazana konsola, gdzie False = ukryta
Global $stateOptions = False
Global $tX = @DesktopWidth / 4
Global $tY = 0
Global $i = 2, $j = 6 ;zmienne potrzebne przy liczeniu wysokosci i szerokosci okna
Global $tWidth = @DesktopWidth / $i, $tHeight = @DesktopHeight / $j + 10
Global $cHeight = @DesktopHeight / 2

;Ukrywanie okien
Global $hide_speed = 10;

;Efekt glass
Global $Struct = DllStructCreate("int cxLeftWidth;int cxRightWidth;int cyTopHeight;int cyBottomHeight;")
Global $sStruct = DllStructCreate("dword;int;ptr;int")

If Not IniRead(@ScriptDir & "data_shortcuts.ini", "number", "n", "") Then
IniWrite(@ScriptDir & "data_shortcuts.ini", "number", "n", $n)
Else
$n = IniRead(@ScriptDir & "data_shortcuts.ini", "number", "n", "")
EndIf

$cmd = Run(@ComSpec, "", @SW_HIDE, $STDERR_CHILD + $STDIN_CHILD + $STDOUT_CHILD)

;TOOLBAR
$Toolbar = GUICreate("Flawless Toolbar by Zwierzak", $tWidth, $tHeight, $tX, $tY, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_ACCEPTFILES, $WS_EX_TOOLWINDOW))
$LV = GUICtrlCreateListView("", -1, -1, $tWidth + 30, $tHeight + 5, BitOR($LVS_SINGLESEL, $LVS_ICON, $LVS_EX_REGIONAL)) ;liczby dodawane aby ukryc "biale linie"
_GUICtrlListView_SetIconSpacing($LV, 80, 80)
_GUICtrlListView_SetView($LV, 1) ;ustawia rozmiar ikon
GUICtrlSetState($LV, $GUI_DROPACCEPTED)
;niewidoczny przycisk odpowiedzialny za tworzenie hotkey'a jedynie dla aktywnego okna
$buttonDelete = GUICtrlCreateButton("Delete", 0, -50)
$buttonExit = GUICtrlCreateButton("Exit", 50, -50)
Local $AccelKeys[2][2] = [["{DEL}", $buttonDelete],["{ESC}", $buttonExit]]
GUISetAccelerators($AccelKeys, $Toolbar)

;CONSOLE
$hConsole = GUICreate("Flawless Console by Zwierzak", @DesktopWidth, $cHeight, 0, -$cHeight, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW));zostanie stworzona ukryta
$consoleList = _GUICtrlRichEdit_Create($hConsole, "", 0, 0, @DesktopWidth, $cHeight - 30, BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL))
_GUICtrlRichEdit_SetReadOnly($consoleList)
$consoleInput = GUICtrlCreateInput("", 0, $cHeight - 30, @DesktopWidth - 50, 30)
GUICtrlSetFont($consoleInput, 12)
$Enter = GUICtrlCreateButton("Enter", @DesktopWidth - 50, $cHeight - 30, 50, 30)
GUICtrlSetState($Enter, $GUI_DEFBUTTON)

;OPTIONS
$Options = GUICreate("Opcje", 400, 500, 192, 124)
$Apply = GUICtrlCreateButton("Zapisz", 0, 470, 100, 30)
$Cancel = GUICtrlCreateButton("Anuluj", 300, 470, 100, 30)
$tabs = GUICtrlCreateTab(0, 0, 400, 470)
$page1 = GUICtrlCreateTabItem("Ogolne")
$Checkbox1 = GUICtrlCreateCheckbox("Uruchom przy starcie systemu", 8, 32, 161, 17)
GUICtrlCreateTabItem("")

;TRAY
$tr_options = TrayCreateItem("Opcje")
$tr_hotkeys = TrayCreateItem("Klawisze skrótów")
$tr_opis = TrayCreateItem("O programie")
$tr_exit = TrayCreateItem("Exit")


If @OSVersion = "WIN_VISTA" Or @OSVersion = "WIN_7" Then
_Vista_EnableBlurBehind($Toolbar)
_Vista_EnableBlurBehind($hConsole)
GUICtrlSetBkColor($LV, 0x000000)
GUICtrlSetColor($LV, 0xFFFFFF)
GUICtrlSetBkColor($consoleInput, 0x000000)
GUICtrlSetColor($consoleInput, 0xFFFFFF)
GUICtrlSetBkColor($Enter, 0x000000)
GUICtrlSetColor($Enter, 0xFFFFFF)
_GUICtrlRichEdit_SetBkColor($consoleList, 0x000000)
_GUICtrlRichEdit_SetCharColor($consoleList, 0xFFFFFF)
EndIf

_load_icons()
_load_settings()

GUISetOnEvent($GUI_EVENT_DROPPED, "GuiEvent", $Toolbar)
GUISetOnEvent($GUI_EVENT_CLOSE, "GuiEvent", $Toolbar)
GUISetOnEvent($GUI_EVENT_CLOSE, "_show_options", $Options)
GUICtrlSetOnEvent($buttonDelete, "GuiEvent")
GUICtrlSetOnEvent($buttonExit, "GuiEvent")
GUICtrlSetOnEvent($Enter, "GuiEvent")
GUICtrlSetOnEvent($Apply, "_save_settings")
GUICtrlSetOnEvent($Cancel, "_show_options")


TrayItemSetOnEvent($tr_exit, "_exit")
TrayItemSetOnEvent($tr_options, "_show_options")
TrayItemSetOnEvent($tr_opis, "_about")
TrayItemSetOnEvent($tr_hotkeys, "_hotkeys")

AdlibRegister("cout", 100)

GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

GUISetState(@SW_SHOW, $Toolbar)
GUISetState(@SW_SHOW, $hConsole)
TrayTip("Info", "Klawisze skrótów opisane są w menu tray, znajdują się pod pozycją 'Klawisze skrótów' ", 10000)

While 1
Sleep(100)
_Start()
WEnd

Func GuiEvent()
Switch @GUI_CtrlId
Case $GUI_EVENT_CLOSE, $buttonExit
_exit()
Case $buttonDelete
If _delete() = 0 Then ContinueCase
_GUICtrlListView_DeleteAllItems($LV)
_load_icons()
Case $Enter
Switch GUICtrlRead($consoleInput)
Case "exit"
_add_edit(GUICtrlRead($consoleInput) & @CRLF & "Exiting console...")
GUICtrlSetData($consoleInput, "")
Sleep(1000)
_exit()
Case "cls"
Local $number = _GUICtrlRichEdit_GetLineCount($consoleList) ;zwraca liczbe linii
Local $last_line = _GUICtrlRichEdit_GetTextInLine($consoleList, $number) ;zapisuje ostatnia linie
_GUICtrlRichEdit_SetText($consoleList, "")
_add_edit($last_line)
Case Else
StdinWrite($cmd, GUICtrlRead($consoleInput) & @CRLF)
EndSwitch
GUICtrlSetData($consoleInput, "")
Case $GUI_EVENT_DROPPED

Local $szDrive, $szDir, $szFname, $szExt, $name
$exeDir = @GUI_DragFile ;sciezka do pliku
_PathSplit($exeDir, $szDrive, $szDir, $szFname, $szExt)
If $szExt = "" Then ;folder
;update
$name = StringSplit($exeDir, "")
If $name[$name[0]] <> "" Then
$name = $name[$name[0]]
Else
$name = $name[$name[0]-1]
EndIf
GUICtrlCreateListViewItem($name, $LV)
GUICtrlSetImage(-1, $exeDir, -1, 1)
#cs

If @OSVersion = "WIN_VISTA" Or @OSVersion = "WIN_7" Then
$icon_dir = IniRead($exeDir & "desktop.ini", ".ShellClassInfo", "IconResource", "")
If $icon_dir = "" Then
GUICtrlSetImage(-1, @SystemDir & "shell32.dll", 4, 1) ;ikona podstawowa
Else
$test_string = StringSplit($icon_dir, ",")
GUICtrlSetImage(-1,$test_string[1], $test_string[2]+1) ;ikona pobrana
EndIf

ElseIf @OSVersion = "WIN_XP" Or @OSVersion = "WIN_XPe" Then
$icon_dir = IniRead($exeDir & "desktop.ini", ".ShellClassInfo", "IconFile", "")
If $icon_dir = "" Then
GUICtrlSetImage(-1, @SystemDir & "shell32.dll", 4, 1) ;ikona podstawowa
Else
$icon_dir = StringReplace($icon_dir, "%SystemRoot%", EnvGet("SystemRoot"))
$icon_index = IniRead($exeDir & "desktop.ini", ".ShellClassInfo", "IconIndex", "")
GUICtrlSetImage(-1,$icon_dir, $icon_index+1) ;ikona pobrana
EndIf
EndIf
#ce
_save($exeDir)
ElseIf $szExt = ".exe" Then ;aplikacja
Update($exeDir)
_save($exeDir)
ElseIf $szExt = ".lnk" Then ;skrot
Local $dir = FileGetShortcut($exeDir)
Update($dir[0])
_save($dir[0])
EndIf
EndSwitch
EndFunc ;==>GuiEvent

Func cout()
$line = StdoutRead($cmd)
$error = StderrRead($cmd)

If $error <> "" Then _add_edit(@CRLF & $error)
If $line <> "" Then _add_edit($line)
EndFunc ;==>cout

Func _add_edit($text)
_GUICtrlRichEdit_SetFont($consoleList, 10, "Lucida Console")
_GUICtrlRichEdit_AppendText($consoleList, Console_CP852_to_UNICODE($text))
GUICtrlSetState($consoleInput, $GUI_FOCUS)
EndFunc ;==>_add_edit

Func _save_settings()
If GUICtrlRead($Checkbox1) = 1 Then
FileCreateShortcut(@ScriptDir & "" & @ScriptName, @StartupDir & "" & @ScriptName, @ScriptDir)
IniWrite(@ScriptDir & "settings.ini", "autostart", "value", "1")
Else
FileDelete(@StartupDir & "" & @ScriptName & ".lnk")
IniWrite(@ScriptDir & "settings.ini", "autostart", "value", "4")
EndIf

_show_options()
EndFunc ;==>_save_settings

Func _load_settings()
GUICtrlSetState($Checkbox1, IniRead(@ScriptDir & "settings.ini", "autostart", "value", ""))
EndFunc ;==>_load_settings

Func _save($data)
;data - sciezka do pliku
Local $szDrive, $szDir, $szFname, $szExt
$n = IniRead(@ScriptDir & "data_shortcuts.ini", "number", "n", "")

_PathSplit($data, $szDrive, $szDir, $szFname, $szExt)
Local $wd = $szDrive & $szDir

$n += 1
IniWrite(@ScriptDir & "data_shortcuts.ini", "shortcuts", $n, $data);zapisuje sciezke
IniWrite(@ScriptDir & "data_shortcuts.ini", "shortcuts", $n & "_wd", $wd) ;zapisuje working dir

IniWrite(@ScriptDir & "data_shortcuts.ini", "number", "n", $n)
EndFunc ;==>_save

Func _load_icons()
$n = IniRead(@ScriptDir & "data_shortcuts.ini", "number", "n", "")
For $i = 1 To $n Step +1
Update(IniRead(@ScriptDir & "data_shortcuts.ini", "shortcuts", $i, ""))
Next
EndFunc ;==>_load_icons

Func Update($directory)
$IHM = _WinAPI_ExtractIconEx($directory, -1, 0, 0, 0)
Local $filename = FileGetVersion($directory, "ProductName")

If $filename = "" Then
Local $string = StringSplit($directory, "");string[0]=ilosc elementow, string[string[o]]=ostatni element="name.exe"
Local $name = StringSplit($string[$string[0]], ".");name[1]=nazwa, name[2]="exe"
$filename = $name[1]
EndIf
GUICtrlCreateListViewItem($filename, $LV)
GUICtrlSetImage(-1, $directory, -1, 1)
EndFunc ;==>Update

Func _delete()
$n_index = _GUICtrlListView_GetSelectionMark($LV)

If $n_index = -1 Then Return 0;jesli nic nie jest zaznaczone, wychodzi z funkcji

$n_index += 1
$n = IniRead(@ScriptDir & "data_shortcuts.ini", "number", "n", "")

IniDelete(@ScriptDir & "data_shortcuts.ini", "shortcuts", $n_index)
IniDelete(@ScriptDir & "data_shortcuts.ini", "shortcuts", $n_index & "_wd")
For $i = $n_index + 1 To $n Step +1
IniWrite(@ScriptDir & "data_shortcuts.ini", "shortcuts", $i - 1, IniRead(@ScriptDir & "data_shortcuts.ini", "shortcuts", $i, ""))
IniWrite(@ScriptDir & "data_shortcuts.ini", "shortcuts", $i - 1 & "_wd", IniRead(@ScriptDir & "data_shortcuts.ini", "shortcuts", $i & "_wd", ""))
Next
IniDelete(@ScriptDir & "data_shortcuts.ini", "shortcuts", $n)
IniDelete(@ScriptDir & "data_shortcuts.ini", "shortcuts", $n & "_wd")

IniWrite(@ScriptDir & "data_shortcuts.ini", "number", "n", $n - 1);aktualizuje n

;nie chcialo mi sie sprawdzac kiedy tworzy sie zerowy wpis, wiec po prostu zawsze go usuwam xD
IniDelete(@ScriptDir & "data_shortcuts.ini", "shortcuts", "0")
IniDelete(@ScriptDir & "data_shortcuts.ini", "shortcuts", "0_wd")

Return 1
EndFunc ;==>_delete

Func _Start()
If $Start Then
$Start = 0
Local $index = _GUICtrlListView_GetSelectionMark($LV)
Local $path = IniRead(@ScriptDir & "data_shortcuts.ini", "shortcuts", $index + 1, "") ;czyta sciezke
Local $wd = IniRead(@ScriptDir & "data_shortcuts.ini", "shortcuts", $index + 1 & "_wd", "");czyta working dir

ShellExecute($path, "", $wd)
EndIf
EndFunc ;==>_Start

Func _exit()
AdlibUnRegister("cout")
AdlibUnRegister("_hide_show_toolbar")
Exit
EndFunc ;==>_exit

Func _show_options()
If $stateOptions = False Then
GUISetState(@SW_SHOW, $Options)
$stateOptions = True
Else
GUISetState(@SW_HIDE, $Options)
$stateOptions = False
EndIf
EndFunc ;==>_show_options

Func _hide_show_toolbar()
$winpos = WinGetPos(WinGetTitle($Toolbar))

If $stateTool = True Then ;toolbar jest widoczny
While $winpos[1] + $winpos[3] > 0
$winpos = WinGetPos(WinGetTitle($Toolbar))
WinMove(WinGetTitle($Toolbar), "", $tX, $winpos[1] - 10)
Sleep($hide_speed)
WEnd
$stateTool = False
Else ;toolbar jest niewidoczny
While $winpos[1] < 0
$winpos = WinGetPos(WinGetTitle($Toolbar))
WinMove(WinGetTitle($Toolbar), "", $tX, $winpos[1] + 10)
Sleep($hide_speed)
WEnd
WinMove(WinGetTitle($Toolbar), "", $tX, $tY);umieszcza okno gdzie bylo przy tworzeniu
WinActivate(WinGetTitle($Toolbar))
$stateTool = True
EndIf
EndFunc ;==>_hide_show_toolbar

Func _show_hide_console()
If $stateConsole = False Then ;konsola jest ukryta
Do
$winpos = WinGetPos(WinGetTitle($hConsole))
WinMove(WinGetTitle($hConsole), "", 0, $winpos[1] + 30)
Sleep($hide_speed)
Until $winpos[1] > 0
WinMove(WinGetTitle($hConsole), "", 0, 0)
$stateConsole = True
WinActivate(WinGetTitle($hConsole))
Else;kosnola jest widoczna
Do
$winpos = WinGetPos(WinGetTitle($hConsole))
WinMove(WinGetTitle($hConsole), "", 0, $winpos[1] - 30)
Sleep($hide_speed)
Until $winpos[1] < -$cHeight
$stateConsole = False
EndIf
EndFunc ;==>_show_hide_console

Func _volume_mute()
Send("{Volume_mute}")
EndFunc ;==>_volume_mute

Func _volume_up()
Send("{Volume_up}")
EndFunc ;==>_volume_up

Func _volume_down()
Send("{Volume_down}")
EndFunc ;==>_volume_down

Func _about()
MsgBox(64, "Flawless Toolbar", "Flawless Toolbar Beta by zwierzak(autoit.xaa.pl)")
EndFunc ;==>_about

Func _hotkeys()
MsgBox(64, "Flawless Toolbar", "Aby pokazać / ukryć toolbara wciśnij ctrl+1" & @CRLF & "Aby pokazać / ukryć konsolę wciśnij ctrl+2" & @CRLF & "Aby skasować ikonkę z listy zaznacz ją i wciśnij 'delete'" & @CRLF & @CRLF & "Korzystając z klawiatury numerycznej..." & @CRLF & "Aby zwiekszyc głośność dźwięku wciśnij 'ctrl alt +'" & @CRLF & "Aby zmniejszyc głośność dźwięku wciśnij 'ctrl alt -'" & @CRLF & "Aby wyłączyć/włączyć dźwięk wciśnij 'ctrl alt /'")
EndFunc ;==>_hotkeys

Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndLV, $tInfo
$hWndLV = GUICtrlGetHandle($LV)

$tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
$hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
$iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
$iCode = DllStructGetData($tNMHDR, "Code")
Switch $hWndFrom
Case $hWndLV
Switch $iCode
Case $NM_DBLCLK
Local $LVHT = _GUICtrlListView_HitTest($hWndLV)
If $LVHT[0] <> -1 And StringRight($exeDir, 4) <> ".icl" Then
$Start = 1;click approved
$LHT = ($LVHT[0] + 1)
EndIf
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_NOTIFY

Func _Vista_EnableBlurBehind($hWnd, $bColor = 0x000000)
Const $DWM_BB_ENABLE = 0x00000001

DllStructSetData($sStruct, 1, $DWM_BB_ENABLE)
DllStructSetData($sStruct, 2, "1")
DllStructSetData($sStruct, 4, "1")

GUISetBkColor($bColor, $hWnd)
$Ret = DllCall("dwmapi.dll", "int", "DwmEnableBlurBehindWindow", "hwnd", $hWnd, "ptr", DllStructGetPtr($sStruct))
If @error Then
Return 0
Else
Return $Ret
EndIf
EndFunc ;==>_Vista_EnableBlurBehind

Func Console_CP852_to_UNICODE($sText = "")
; Tablica zamienników Strony kodowej CMD (CP/OEM 852) na standard Unicode (UTF-8)
Dim $CODEPAGE[20][2]
$CODEPAGE[1][0] = "0x88"
$CODEPAGE[1][1] = "ł"
$CODEPAGE[2][0] = "0x9D"
$CODEPAGE[2][1] = "Ł"
$CODEPAGE[3][0] = "0x86"
$CODEPAGE[3][1] = "ć"
$CODEPAGE[4][0] = "0x8F"
$CODEPAGE[4][1] = "Ć"
$CODEPAGE[5][0] = "0x97"
$CODEPAGE[5][1] = "Ś"
$CODEPAGE[6][0] = "0x98"
$CODEPAGE[6][1] = "ś"
$CODEPAGE[7][0] = "0xE0"
$CODEPAGE[7][1] = "Ó"
$CODEPAGE[8][0] = "0xA2"
$CODEPAGE[8][1] = "ó"
$CODEPAGE[9][0] = "0xA5"
$CODEPAGE[9][1] = "ą"
$CODEPAGE[10][0] = "0xA4"
$CODEPAGE[10][1] = "Ą"
$CODEPAGE[11][0] = "0xA8"
$CODEPAGE[11][1] = "Ę"
$CODEPAGE[12][0] = "0xA9"
$CODEPAGE[12][1] = "ę"
$CODEPAGE[13][0] = "0xAB"
$CODEPAGE[13][1] = "ź"
$CODEPAGE[14][0] = "0x8D"
$CODEPAGE[14][1] = "Ź"
$CODEPAGE[15][0] = "0xBD"
$CODEPAGE[15][1] = "Ż"
$CODEPAGE[16][0] = "0xBE"
$CODEPAGE[16][1] = "ż"
$CODEPAGE[17][0] = "0xE3"
$CODEPAGE[17][1] = "Ń"
$CODEPAGE[18][0] = "0xE4"
$CODEPAGE[18][1] = "ń"
$CODEPAGE[19][0] = "0xF5"
$CODEPAGE[19][1] = "$"

$sRet = ""
For $iIter = 1 To StringLen($sText) Step 1
$itmp = StringMid($sText, $iIter, 1)
For $iRep = 1 To 19 Step 1
If Asc($itmp) = $CODEPAGE[$iRep][0] Then $itmp = $CODEPAGE[$iRep][1]
Next
$sRet &= $itmp
Next
Return $sRet
EndFunc ;==>Console_CP852_to_UNICODE

;Autor: zwierzak(autoit.xaa.pl)
Edited by zwierzak
Link to comment
Share on other sites

seems like a nice project, though i am doubtful if anyone wants to join you.

is this all in autoit? opensource?

in terms of finding helpers, you may have more luck poking around on IRC channels.

ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search

Link to comment
Share on other sites

that came out a little rude. what i mean is this forum doesn't really do much in the name of big development.

ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search

Link to comment
Share on other sites

Yea it would be an open-source project. Hmm I don't really know any IRCs that could help me find someone to work with. Any nice IRCs?

Is it all in au3? Basically - yes. I mean atm it is all in au3. However - later on if the project gets bigger and more complicated funtions would be needed I thought about writing my own dll's in C++ so that the whole program would work faster.

Edited by zwierzak
Link to comment
Share on other sites

try cryto.net, if not some development channels on freenode.

ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search

Link to comment
Share on other sites

I looked at the console .png and thought "wow that is really cool". The idea of having a console like thing "where i could invent my own syntax while maintain a nerd feelin on the desktop" seams very appealing to me ^^

If its the case you have written this all in .au3, could you release the source code for the console. As i would much like to have it on my system :)

Link to comment
Share on other sites

Sure I can. But remember that this console is hooked to the CMD one, so in fact you can only use procedures from CMD. However, you can easily add new funcions using au3, nothing simplier than that :) I posted the code for whole project in the first post.

Link to comment
Share on other sites

@Zwierzak. I apologise for not replying sooner. My pc is missing its graphics card, and the laptop doesn’t have internet. So i can only access the forums when dad is out and i can use his pc.

First. Thanks again for providing the source code, when i saw the pictures i thought “i would love this on my pc” but with limited experience with GUIs would not of turned out as nice as yours J. Now i understand your looking for a partner and at first glace this response might seem promising for you unfortunately though i have only taken an interest to that feature of the code *and only for a standalone machine, not unicode working for all pcs*. The second reason is because this is your vision / baby / project, it will require someone that shares your exact vision for how / where it should go or they work for you “ie money”. As you will see by the code I provided I have taken it into a massive different direction. I will provide some points / views and 1 improvement as thanks though. I also hope by the fact the source is available maybe some others will skim though it in a effort help improve syntax / performance in creative’s ways.

Second. As a warning, if your protective of your work look away now ^^ As i have stripped, gutted it and reworked it into “My preferred” version for the console. As i said before GUI is a skill i lack allot in Autoit. Mainly because most of my coding is done behind the scenes, where there are no user interactions with GUI Elements.

#notrayicon
#include <GuiConstants.au3>
#include <WindowsConstants.au3>
#include <GuiRichEdit.au3>
Opt("GUIOnEventMode", 1)
HotKeySet("{`}", "Console")

Global $stateConsole = False
local $hConsole
local $consoleList
local $consoleInput

While 1
Sleep(250)
WEnd

Func Console()
   If $hConsole = "" Then CreateConsole()
   
   If $stateConsole = False Then
      $stateConsole = True
      GUISetState(@SW_SHOW, $hConsole)
      ClearConsole()
      For $A=-256 to 0 step 30
         WinMove($hConsole, "", 0, $A)
         Sleep(15)
      Next
      WinMove($hConsole, "", 0, 0)
      ControlSend("[Class:AutoIt v3 GUI]", "", "[CLASS:Edit; INSTANCE:1]", "{Space}")
      ControlSend("[Class:AutoIt v3 GUI]", "", "[CLASS:Edit; INSTANCE:1]", "{BackSpace}")
      GUICtrlSetOnEvent($consoleInput, "GuiEvent")
   Elseif $stateConsole = True Then
      $stateConsole = False
      GUICtrlSetOnEvent($consoleInput, "")
      For $A=0 to -256 step -30
         WinMove($hConsole, "", 0, $A)
         Sleep(15)
      Next
      GUISetState(@SW_HIDE, $hConsole)
   EndIf
EndFunc

Func GuiEvent()
   If ControlGetFocus("[Class:AutoIt v3 GUI]") = "Edit1" Then
      Switch GUICtrlRead($consoleInput)
         Case "exit"
            Exit
         Case "clear"
            ClearConsole()
         Case "Help"
            AddConsole(GUICtrlRead($consoleInput) & @CRLF)
            AddConsole("Commands Alavaible" & @CRLF)
            AddConsole("Help - For command Information" & @CRLF)
            AddConsole("Exit - Ends The Script" & @CRLF)
            AddConsole("Clear - Emptys the Console Cache" & @CRLF)
            AddConsole("" & @CRLF & "C:Windows>")
         Case Else
            AddConsole(GUICtrlRead($consoleInput) & @CRLF)
            AddConsole("'" & GUICtrlRead($consoleInput) & "' is not a recongized as a interal or external command line." & @CRLF)
            AddConsole("" & @CRLF & "C:Windows>")
      EndSwitch
      GUICtrlSetData($consoleInput, "")
      ControlSend("[Class:AutoIt v3 GUI]", "", "[CLASS:Edit; INSTANCE:1]", "{Space}")
      ControlSend("[Class:AutoIt v3 GUI]", "", "[CLASS:Edit; INSTANCE:1]", "{BackSpace}")
   Else
      Console()
   EndIf  
EndFunc ;==>GuiEvent

Func AddConsole($text)
   _GUICtrlRichEdit_SetFont($consoleList, 10, "Lucida Console")
   _GUICtrlRichEdit_AppendText($consoleList, $text)
   ControlFocus("[Class:AutoIt v3 GUI]", "", "[CLASS:Edit; INSTANCE:1]")
EndFunc ;==>AddConsole

Func ClearConsole()
   _GUICtrlRichEdit_SetText($consoleList, "")
   AddConsole("Microsoft Windows [Version 6.1.7600]" & @CRLF)
   AddConsole("CopyRight 2009 Microsoft Corpation. All Rights Reserved." & @CRLF)
   AddConsole("" & @CRLF & "C:Windows>")
EndFunc

Func CreateConsole()
   $hConsole = GUICreate("", 1366, 256, 0, -256, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW, $WS_EX_TRANSPARENT))
   $consoleList = _GUICtrlRichEdit_Create($hConsole, "", 0, 0, 1366, 256 - 30, BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL, $ES_READONLY))
   $consoleInput = GUICtrlCreateInput("", 0, 226, 1366, 30)

   GUISetBkColor(0x00000, $hConsole)
   _GUICtrlRichEdit_SetBkColor($consoleList, 0x000000)
   _GUICtrlRichEdit_SetCharColor($consoleList, 0xFFFFFF)
   GUICtrlSetBkColor($consoleInput, 0x000000)
   GUICtrlSetColor($consoleInput, 0xFFFFFF)
   GUICtrlSetFont($consoleInput, 12)
   WinSetTrans($hConsole, "", 200)
EndFunc

Lastly. You asked for some ideas so here is a small list.

*In My code i have removed the cmd function “as it delayed start up by 400 MS, i dislike the idea of a hidden cmd running 24/7. Plus for me i find windows cmd syntax very troublesome. Not something i would want to use to get anything done. But as yours offers many features i do think you should keep it in. “I have even written mine to emulate cmd while really just being a cool looking input box ^^. I might suggest though only "opening the cmd" when the console is opened and closing the cmd when console is finished. To help with system resources.

*I think the transparent effect you added for Vista and W7 “i use w7” is very cool!! But... i really struggled to see any text on a white / bright background. Changing the text colour didn’t work out very well and i have a feeling no matter what colour the text is, on some wallpaper it will be hard to see. In my version i set the back as black, text as white and set the transparty as 175. So it’s like yours, not as cool but allot easier to see. If you did go down this route, you could make it so people could add custom colours “for the background / text” as i get the impression your script can save variables outside the exe "in a .ini file" So that would work.

*I removed the enter button. As this is all text driven,in both yours and mine, any mouse interaction is blocked within the list. Then needing to move the mouse to enter is not needed. Just my preference, adds more text space and plus i think all buttons are ulgy. The pc should read my mind instead of me needing to click a button!! J

*In the GUI Paramaters i set the GUI to transprant “So you can click though it, and doing so losing focus on the GUI, Making it hide. I like it, again personal preference

*Lastly. I did fine one improvement. Instead of doing While, until, checking the pos of the window. Its must easier to do

Do
$winpos = WinGetPos(WinGetTitle($hConsole))
WinMove(WinGetTitle($hConsole), "", 0, $winpos[1] + 30)
Sleep($hide_speed)
Until $winpos[1] > 0
WinMove(WinGetTitle($hConsole), "", 0, 0)

can be replaced with

For $A=-256 to 0 step 30
WinMove($hConsole, "", 0, $A)
Sleep(($hide_speed)
Next
WinMove($hConsole, "", 0, 0)

2 Reasons why.

First. Less computing. Doesn’t need to get the mouse pos, title "also u don’t need to do this anyways, u can use the $hConsole directly", add 30, check pos again etc.

Second. It doesn't overshoot it. In yours it runs 1 to many times, so u see move down and then quickly back up a bit :)

Hope some of this has helped :)

**Edit Lastly again, i have never written a post this long in my history of being on the forums. So yea, take it as a sign of respect.

Edited by IanN1990
Link to comment
Share on other sites

Two More ideas :)

*In your cmd console, i noticed u can use normal words. Eg. Exit makes the console exit. This also means your able to add more.

Such as

Help - Lists all Custom Commands you have programmed

Clear - Removes all the text built up in the scroll box

If i think of any more ideas, i will add it here

*Reason is. If i edit my last post, the code will lose all spacing and it will take ages to get it back into place :)

Link to comment
Share on other sites

Thank you for your effort you've put into considering my request. I will surely make use of your advice and improve many things. I was aware of the problem with the letters being illegible, however I haven't managed to write the color-chaning part yet. I was thinking about adding custom command; something like: "color red" that will change the color of the font. And yes, you are right I can easily add new commands into this console so as a result, the are numerous possibilities of developing this project. I am look forward to hearing any new ideas that come to your head :) I would also like to ask you(or whoever) to look into the toolbar part, namely extracting icons for folders. It doesn't always work with different system icons and I don't know why. Thank you in advance!

Edited by zwierzak
Link to comment
Share on other sites

Another idea that i had was, I noticed when ever i use the cmd in windows 7. Its only ever to execuate unique commands, most needing a elevated cmd prompt "ie with admin rights".

So maybe that idea might be something useful 2 u ? Also if you have changed your work, and upload ur edited code i will always have a look if i can :) see if any more ideas pop 2 mind.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...